How to Build a Web 2.0 Site from Something that’s not..

Well I have taken on the task of helping to transition a java website to Microsoft ASP.NET 2.0.  It’s more of a port but there is a lot of work to do. The first consideration was the database. MySQL to Microsoft SQL. I found a great utility that took a lot of time out of scripting the transfer. There is a great little utility out there called MySQLtoMSSQL from a company called Intelligent Converters. It does the job nicely if you can connnect to MySQL through ODBC..

Being a developer, the demo version did all I need it would only import the first five rows of data but that was just fine for me. I really needed just to get sample data and the structure over. I am going to have the company by this product when we do the final move over to automate the process. I love the fact that this product as a demo gives the right amount of functionality.

After I got the database ported I detached it using SQL Express Management Studio, I can’t tell you how easy the free Management Studio is to work with. It has great value, Thank you Microsoft for giving us this! I was then able to take the detached MDF file and drop it into my visual web developer studio project. This project is actually an “Atlas” project. Again thanks to two free products (can you believe Microsoft gives away a fully functional visual studio for web development?? Yeah they do wow!) Anyway, I installed the Microsoft “Atlas” projects and control toolkit into the visual studio project before dropping in the database. When I dropped the database in it added a special asp.net folder called the app_data folder. Then I was ready to go..

Atlas is important because it is a free toolkit that lets you create applications that have web 2.0 type functionality. It does things like extended drag and drop controls (components) with javascript (AJAX style) so it  So things that annoy the user (like screen redraws, end users call them “blinking” pages) will be history. Also the pages seem smarter and can exhibit new functionality.

  • “Atlas” enables your site to take full advantage of modern browser capabilities.
  • “Atlas” will work across IE, Firefox, Mozilla, and Safari with no modifications. 
  • “Atlas” empowers ASP.NET developers to effortlessly create richer web experiences.
  • “Atlas” includes a client-side Javascript framework for easy script creation and reuse.
  • “Atlas” makes it super easy to consume services from ASP.NET.
  • “Atlas” makes building composite applications from the programmable web a snap.

So the next bit of business was adding membership functionality logins to the site. This didn’t take very long at all. Microsoft has done all the work for you with ASP.NET 2.0. You don’t have to re-invent the wheel with the member classes and the set of login and user creation controls. This totally used to take hours in ASP.NET 1.1. Now it just takes minutes.. I really recommend if you are new to asp.net 2.0 that you review the videos on membership and logins at www.asp.net. They will step this through for you nicely.

I used to spend a lot of time dealing with developers and artists that stepped on each other’s work. In languages like PHP and the older ASP it was common to have a web page with script in it inside a line where a graphic was sitting. It took a special artist not to wipe out code when they were asked to make modifications to art etc.. Now with asp.net all of that is completely separated. You can use code behind pages for all the code you will compile. The advantage to compiled code is it’s fast and a lot more secure. The asp.net model separates code from graphics, allowing both work to be done simultaneously for later integration.  Artists and programmers get along much better with asp.net.. A graphics change is very fast too (almost immediate not requiring the programmer to visit it).

ASP.NET wisely introduces theming and master pages for designers so you can take a design and implement it using both it’s own skinning and CSS functionality.This makes it easy to control things including setting up navigational elements that are saved in an XML sitemap. The level of customization is quite amazing.

Okay back to the database for a bit.. When porting a website you usually have to have three tiers of functionality

  1. The pages themselves
  2. A data access layer-a standard way for you to access your database from the web pages 
  3. A “BuLL” layer aka the business logic layer where all the rules for business and how the site reacts to things are put into play.

Visual Web Developer to the Rescue

ASP.NET presents the user with the idea of  “datasets” which allow data out of the database to be accessed in their heirarchies. The dataset designer will actually allow you to create the Data Access Layer in a very standard way, including writing the code in a very standard way to let you exhume any kind of data from the database. If you are using other development environments or older ones you really haven’t seen how cool and time saving it is to use the Visual Web Developer Dataset designer.. Bryan Noyes wrote a great article to get you started with it, and walks you thru creating a fully complete DAL.. Check it out here at the ServerSide.NET.

 

If you are looking for more information on building a business logic layer you should check out This ASP.NET 2.0 Tutorial Page..

Developer’s Secret Weapon

If you really want to cut your production time and you need to create a Data layer from an existing database I would have to recommend two products as a SECRET weapon..

CodeSmith Studio Pro and  NetTiers, when combined these two products can cut your development time by hundreds of hours…

 

 

Codesmith withNetTiers will create a “Microsoft Standards and Practices compliant” data access layer that has all the features of the database in amazingly fast time (you can be done in 15 minutes and have something that is very functional.

Web 2.0 focuses the developer on the design and usibility of a web site. In the next chapter we’ll focus on the UI, adding a Shopping Cart.. Web Application states and wrapping it all together..

Advertisements
Explore posts in the same categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: