Saturday, September 3, 2011

MVC

Model–view–controller (MVC) is a software architecture, currently considered an architectural pattern used in software engineering. The pattern isolates "domain logic" (the application logic for the user) from the user interface (input and presentation), permitting independent development, testing and maintenance of each (separation of concerns). The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes [Burbeck92]: Model. The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller). View. The view manages the display of information. Controller. The controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate.
Figure 1 depicts the structural relationship between the three objects. It is important to note that both the view and the controller depend on the model. However, the model depends on neither the view nor the controller. This is one the key benefits of the separation. This separation allows the model to be built and tested independent of the visual presentation. The separation between view and controller is secondary in many rich-client applications, and, in fact, many user interface frameworks implement the roles as one object. In Web applications, on the other hand, the separation between view (the browser) and controller (the server-side components handling the HTTP request) is very well defined. Model-View-Controller is a fundamental design pattern for the separation of user interface logic from business logic. Unfortunately, the popularity of the pattern has resulted in a number of faulty descriptions. In particular, the term "controller" has been used to mean different things in different contexts. Fortunately, the advent of Web applications has helped resolve some of the ambiguity because the separation between the view and the controller is so apparent.
Courtesy :msdn

MVC Examples:
A Simple E-Commerce Storefront Application
ASP.NET MVC Source Code
Courtesy: ScottGu's Blog

ASP.NET MVC Tutorials
Courtesy: http://www.asp.net

Friday, September 2, 2011

Use .Net created dll in VB6?

There are the steps to follow:

1) Create a class library in VS choose whatever language you want either Vb.NEt or C#
2) Go to to Project Properties->ConfigurationProperties->build, check the Register for Com Interop check box. This creates the COM wrapper for your .NET assembly and hence need not use regasm.
3) Write whatever code you want, expose the classes publicly, expose the properties, functions you want publicly.

Now in your VB project, add the claslibrary.tlb created by the above program.
Now use the classes and functions as you want.

you should not have any problem.

OR

When you deploy a .NET DLL, and you want to use it with COM (such as VB),
you need to register it with "Regasm.exe your_aseembly_file /codebase".
you need to include the /codebase switch when registing assembly in folders
other than GAC.

To use the /codebase switch, the assembly must be strongly-named

Friday, August 26, 2011

Incorrect format of date parameters via datepicker - Reporting Services

Solution:

Add the Culture setting in the ReportViewer.aspx like below:


<%@ Page Language="C#" AutoEventWireup="true" Inherits="Microsoft.ReportingServices.WebServer.ReportViewerPage" Culture="en-AU"%>

Tip:
You can find the page here: C:\program files\microsoft SQL Server\MSQL.3\Reporting Services\ReportServer\Pages

If you want to find the path to the page go to your IIS under Default website select ReportServer or Reports Folder > right click Properties...

Friday, August 19, 2011

"Can't edit module" when running a VB project

When trying to run a VB project users of SourceSafe frequently encounter the error "Can't edit module." This message is not very helpful as it does not indicate precisely where the problem lies.

There are numerous suggestions for how to fix this issue. Those solutions which we have found to be most helpful are listed below in order of most to least helpful:

- Verify that checked-in components do not contain any blank event procedures. The IDE compiler automatically tries to remove any blank procedures when the project is run. If the file is checked-in, it is read-only, so the change cannot take place. Manually remove the blank procedures or check out the affected forms and run the project once to have the compiler automatically remove the blank procedures.

- Save, close, and check-in all files. Save and check-in the project file. Close and re-open VB.

- Delete the .vbw file for the VB project. It will automatically recreate it the next time you open the project.