Labels

Friday, October 29, 2010

ASP.net MVC Vs ASP.net Web Form

Software Architects have been involving lot of debates about different approaches and architectures. Some of the examples are ORM Vs Store Procedures, REST Vs SOAP, etc. There is a debate happening inside the Microsoft community about ASP.net web form Vs ASP.net MVC. Many people thinking that ASP.net MVC will be replace webforms at least eventually and others are thinking that ASP.net MVC will not be replace webforms. Will ASP.net MVC replace webforms?. ASP.net MVC is an alternative approach to webforms rather than a replacement. It will not replace webforms and webforms will not replace ASP.NET MVC. The fact is that ASP.NET MVC and webforms will co-exist and that ASP.NET MVC is not a replacement for webforms. If you prefer ASP.net MVC use it and you feel webform is more comfortable, you can use it. . Both approaches are just choices and different approaches and choices are good things. Different choices are available for other platforms especially in the Java platform.

Advantages of MVC Model
  1. Enable clean separation of concerns (SoC) .
  2. Enable full control over the rendered HTML.
  3. Enable Test Driven Development (TDD) (built with TDD in mind).
  4. SEO and REST friendly URL.
  5. Easy integration with JavaScript frameworks.
  6. Support third-party view engines such as NVelocity, Brail, NHaml.
  7. No ViewState and PostBack events.
  8. Follows the stateless nature of web.
  9. Extensible and Pluggable framework. 
  10. Ideal platform for Web 2.0 applications.
Advantages of Web Form Model
  1. Provides RAD development.
  2. Easy development model for heavy data-driven LOB applications.
  3. Provides rich controls.
  4. Familiar model for windows form developers.
 Problems with ASP.net Web Form
What are the problems with webforms? In webforms, Microsoft has tried to make windows form model development for web application development. That model was attracted lot of windows form developers especially VB 6.0 developers. Many of VB 6.0 developers had moved to ASP.net web development without knowing the basics of HTTP and web. For simulating windows form model development experience, webforms introduced event-driven approach and also introduced Viewstate and Postback. The end result is that web forms breaks the stateless nature of the Web. Both Viewstate and Postbacks have been made lot of problems and increased complexity of the web application development. Many web pages having hundreds of KB size of Viewstate that affected the performance of the applications sometime. Developers do not have the control of the rendering HTML of web forms and Server controls that render html with mixed inline style and deprecated tags that does not follows standards. Another problem with Web Forms is the integration of JavaScript frameworks due to the naming conventions of rendered HTML. The page life cycle of the Web Form is too complex and has the tightly coupling between all things in the ASP.net framework and a single class is used both to display output and handles user input. So unit testing is almost an impossible task. Today unit testing is very important in modern software development especially when we following agile methodologies and practices. Since web is a stateless thing, Events, Postbacks and Viewstate are not a good way. Today many ASP.net web form developers are facing different type pf browser compatibility issues when developing public face internet applications
The ASP.net MVC way
The ASP.NET MVC simplifies the complex parts of ASP.net Web Forms without any compromise of the power and flexibility of ASP.NET platform. ASP.net MVC implements Model-View-Controller UI pattern for web application development that lets you allows to develop applications in a loosely couples manner. MVC pattern is separating the application in three parts- Model, View and Controller. A view is responsible for rendering the user interface (UI) of the application and it is nothing more than html templates that filled with application’s data passed by the controller. The Model implements the logic for the application's data and it represents the business objects of the application that using the View for rendering user interface. Controllers are handles and responds to user input and interaction. The web request will be handled by the controller, and the controller will decide which model objects to use and which view objects to render. The MVC model replaces the Web Form events with the controller actions. The main advantages of the MVC models are clear separation of concerns, unit testing facility, and more control over the URLs and HTML. The MVC model does not use Viewstate, Postbacks, Server controls, and server-based forms that enable full control over the application and html rendered by the Views. MVC model is using Representational state transfer (REST) based URLs instead of file-name extensions used by the Web Form model so that we can make search engine optimization (SEO) URLs published by the application.


Which is the best approach?
The choice would be vary on different people. If you want more control over the HTML or you want Test Driven Development (TDD), or you care about web standards, accessibility, or you want to build SEO based URLs, you can choose MVC model. If you want rich controls and state oriented event-driven web development, you can choose Web Forms model. If you feel more comfortable with MVC, choose that model and you feel Web Form model is more comfortable, choose that model. Both are just choices. If you start your career with ASP.net Web Forms and do not have full knowledge of Web, it will be very difficult moving to MVC model.
I prefer MVC over Web Forms and I feel that Microsoft is going to a right direction through MVC. Its technical features as well as the open source nature are attracted me a lot.The MVC model allows me full control over the HTML and enables Test Driven Development (TDD). We can easily integrate with jQuery and other JavaScript frameworks with MVC. Using extension methods of C# 3.0, we can make powerful and rich HTML helper methods. I believe that tesatbility, refactoring capability and maintainability are the main factors for a successful project and prefer these factors than RAD capability. The MVC model allows to build highly testable, maintainable loosely coupled applications with good practices such as TDD, Seperation of Concerns (SoC) and Dependency Injection (DI). You MUST use ASP.NET MVC for public face internet applications.

http://weblogs.asp.net/shijuvarghese/archive/2008/07/09/asp-net-mvc-vs-asp-net-web-form.aspx

Thursday, October 21, 2010

Online Diagram Tools



Online Diagram Tools


Gliffy – Online Diagramming Creator
Online diagram creator tool that works entirely in your browser for diagramming purpose. Gliffy personally can consider as web based Visio killer diagram tools which able to draw a various types of diagram like Flow Chart, Development process, Web Layout, Floor plan, Class diagram, network diagram and etc.
Plus more, you can simple sign up Gliffy online diagram services freely and start drawing and assemble your diagram online.


DrawAnywhere:
Flowcharts, Process diagrams, Organizational charts, Export your diagram as an image file (jpg, png, etc) or a pdf file.

 Gomockingbird : Mockingbird is an easy and fast way to make clickable wireframes and prototypes. You can reate and share clickable mockups of your website or applications.

  Cacoo : Cacoo is a user friendly online drawing tool that allows you to create a variety of diagrams such as site maps, wire frames, UML and network charts. Cacoo can be used free of charge to collaboratively work on the diagramming. Multiple users can edit the same diagram in a simultaneous collaboration.

Lucidchart : Its again Online diagram and flowchart software. You can create diagrams and drawings such as flowcharts, network diagrams, UML diagrams like Class, Sequence and Activity; wireframes, user interface designs and other drawings online with this tool.

Mindomo: Online Mind Mapping Tool 
– Create, edit mind maps, and share them with your colleagues or your friends.


Flowchart:
Realtime online collaboration between multiple users with different browsers, Drawing Tools (Lines, Arrows, Bézier curves), Objects (Flowchart objects, clipart), Save your Flowchart as a PDF or PNG formats.


Mindmeister: all the standard features of a classic mind mapping tool with as many simultaneous users as you like.

Bubbl: Create colorful mind maps online, Share and work with friends, Embed your mind map in your blog or website. Email and print your mind map, Save your mind map as an image.

Creately for Enterprise




Free Diagram tools to replace Visio

Dia – Open source diagramming software
An open source diagram creation program released under the GPL license. Dia diagramming software can be used to draw many different kinds of diagrams such as entity relationship diagrams, UML diagrams, flowcharts, network diagrams, simple circuits and much more.
Dia free diagramming software even can print diagrams that span multiple pages, export to many formats (EPS, SVG, CGM and PNG), and the ability to use custom shapes created by the user as simple XML descriptions.

Kivio – KOffice Diagramming and flowchart tools
Kivio is a diagramming and flow charting application with tight integration to the other KOffice applications. It enables you to create network diagrams, organization charts, flowcharts and more.
Network Notepad – Free Network diagram software
a network diagram application that let you draw out interactive network diagrams, with user definable management features such as point and click telnet, FTP, HTTP and Ping. Drawing network infrastructure diagram using network notepad is simple. All you need is drag and drop network object on the interface. Meanwhile, you’re able to use the F1-F6 keys as hotkeys to ping, surf, or telnet to a device once IP addresses on network devices object.
Diagram Designer – free Simple Diagram software
a simple vector graphics editor for creating flowchart and diagrams. Its features are customizable template object palette, slide show viewer, import/export WMF, EMF, GIF, BMP, JPEG, PNG, MNG, and PCX images, simple graph plotter to plot mathematical expressions, spellchecker, advanced pocket calculator with equation solver, MeeSoft Image Analyzer integration for bitmap image editing and extended file format support, and uses compressed file format for minimizing drawing file size.

GoVisual Diagram editor (GDE) provides powerful diagramming functionality for editing and automatic layout of diagrams. Their diagrams are represented in form of graphs and cluster graphs. Plus more, all diagram can been printing or export to JPEG, PNG, BMP, and SVG are included.

yEd Diagram Editor – Free Diagram Editor
a free diagram software that able to create flow charts, UML diagrams, mind maps, and many other kinds of diagrams, graphs and networks. Choose from a wide range of highly sophisticated layout algorithms to automatically arrange your diagrams in no time. An intuitive and visually appealing user interface makes creating diagrams fun. Once you are done with creating a diagram you can save, print, or export it to popular formats like PDF, SWF, EMF, JPEG, GIF, XML, PNG, or SVG.

Monday, October 18, 2010

French à can't save correctly when post back save to database

 # <% Session.CodePage=encoding %> tells the server to write to the browser using a different code page than the server uses to read the page. For example, if your ASP page is encoded in Japanese (Shift-JIS), and your browser expects the HTML page to be encoded in UTF-8, then you must specify Session.CodePage=65001 to ensure that the HTML page is encoded in UTF-8. If you do not specify Session.CodePage, the server writes to the browser in the same language as it reads the page.

Note:    If session management has been turned off, you cannot set Session.CodePage.


http://devlibrary.businessobjects.com/businessobjectsxir2/en/en/RAS_SDK/rassdk_com_doc/doc/rassdk_com_doc/BestPractices11.html