Monday, January 14, 2013

Quick Learning Techniques!

Quick Learning Technique:
  1. Get some ppt from Google.
  2. Try to know the features,what they do.
  3. Don't try to know how they work.
  4. Know the details when you need it.
  5. Try a sample code/project
  6. Try searching Google, read forums,blogs.
  7. Then starts writing on it if you want to avoid memorizing.

ASP.NET MVC

What is MVC?
                          To know about mvc pattern click here.

Technical details required to know:


1. Web Matrix:

                          A good link is here.

2. Difference Between ASP and ASP.NET:
  1. ASP is interpreted, ASP.NET is compiled.
  2. Classic ASP uses a technology called ADO to connect and work with databases. ASP.NET uses the ADO.NET technology 
  3. ASP has Mixed HTML and coding logic where in asp.net html and coding part are separated by code behind files. 
  4. ASP.NET purely object oriented whereas ASP is partially object oriented. 
  5. For ASP No in-built support for XML whereas in ASP.NET full XML Support for easy data exchange.

     This answer is taken from here. See also.

3. Connection strings for asp.net mvc:

MVC 3 Connection String without SQLEXPRESS.
Change it in root web.config file


 <connectionStrings>
    <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
  </connectionStrings>

to ========>

 <connectionStrings>
        <add name="ApplicationServices" connectionString="server=MYDBSERVER;uid=MYUSERID;pwd=MYUSERIDPW;database=MYDB" providerName="System.Data.SqlClient" />
  </connectionStrings>



If you're using EF Code First then your connectionstring name must match the name of the DB Context. So if you have MoviesContext as the DB Context then you should have the same name for the connectionstring.
EF Code First uses a lot of conventions so if it doesn't find a connection string named as the DB Context will try to connect to a SQLExpress (doesn't care if there is not one installed) and will look for/create the database with a very long name: Namespace.MovieContext

                    If you face any problem regarding vs 2010 sp1 installation.
see this => an important information.


Difference between get and post method:

               http://en.wikipedia.org/wiki/POST_(HTTP)
               http://forums.asp.net/t/1727293.aspx/1
               http://forums.asp.net/t/1173435.aspx/1

Learning WPF in 2 week!

In visual studio 2012 there are toolbox for WPF.There are several controls. At first let's get acquainted with them.

1. Pointer:
                  If you select a control it is attached with mouse. If you click your form then it will be dropped there. But if you click this "Pointer" control before clicking forms then nothing will be dropped on forms upon clicking it.

2. Border:

                 We can place a "Border" control to define a boundary. Example is shown below: Both item is "Border". First one is customized and the second one is intact.
                  In the side picture we see that If we rotate a "Border" control then all of it's contained items are get rotated also. Very Good!!









3. "Button":
                   This control can be fully customized and can be controlled by touch,mouse or key board.

4. "Calender":

4. "Canvas":
The Green part is a "Canvas". It can be customized (rotated etc.). When we apply a transform it will take effect same on it's contained elements.
If we make this canvas hidden then with all of its elements it gets hidden.










5. "CheckBox":
                        Normal Concept.

6. "ComboBox:"
                        Normal Concept.

7. "ContentControl:"
                        Normal Concept.


8. "DataGrid":
                        Normal Concept. Deatils can be found here.

9. "DatePicker:"
                        Normal Concept.

10. "DockPanel:"
                        Normal Concept. Details are here.

11. "DocumentViewer":
                        Normal Concept. Details are here and here.

12. "Ellipse:"
                        Normal Concept.

13. "Expander:"
                        Normal Concept. Details are here.


14. "Frame":
                        Very good idea!. Can display another window's content. But can't display html content. Details can be found here.



Sunday, January 13, 2013

STAThread


Indicates that the COM threading model for an application is single-threaded apartment (STA).

Details can be found here.

Windows API


The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems.

Details can be found here:

Application programming interface


An application programming interface (API) is a protocol intended to be used as an interface by software components to communicate with each other.

Wednesday, January 9, 2013

Managed Code


I have found following information's on this link

  • Code that is executed by the CLR.
  • Code that targets the common language runtime, the foundation of the .NET Framework, is known as managed code.
  • Managed code supplies the metadata necessary for the CLR to provide services such as memory management, cross-language integration, code access security, and automatic lifetime control of objects. All code based on IL executes as managed code.
  • Code that executes under the CLI execution environment.

Deatils can be found here.