Showing posts with label web frameworks. Show all posts
Showing posts with label web frameworks. Show all posts

Tuesday, April 17, 2012

Web Frameworks, MVC, and ASP.NET

After nearly a year as a community tech preview, Microsoft has released the first true beta of the ASP.NET MVC framework. ASP.NET MVC is a radical departure from the WebForms technology has promoted in the past, and in the opinion of many, a return to mainstream web programming. The MVC pattern provides the cornerstone for web frameworks such as Ruby on Rails and Java's Spring Framework.

MVC web frameworks should not be confused with their namesake, the Model-View-Controller pattern first proposed by Trygve Reenskaug. Under Reenskaug's pattern, the view and controller were tightly bound to one another with a one-to-one mapping between each view and controller. With a MVC web framework, the view and controller are loosely coupled and it is not unheard of for multiple views to be tied to a single controller.

Regardless of which definition of MVC you prefer, the model remains an independent representation of data that has no knowledge of what is using it. This is in contrast to WebForms, where it is common for data to be stored in the UI elements themselves in the form of viewstate. Read More...

Tuesday, December 16, 2008

ASP.NET Development: MVC vs. Web Forms

ASP.NET Web Forms

ASP.NET Web forms is a mature technology that runs many large scale websites and is the traditional style of ASP.NET web development. Starting in the .NET framework version 1.0 it is the first technology where Microsoft made an effort to make web development very robust and much more simple. The web forms declarative syntax plus the event driven model allows you to take full advantage of visual designers by drag and dropping the controls onto ASP.NET pages and then writing code against them, much like Windows style development. This makes web forms development very enticing for a wide range of developers on both Windows and other platforms, where drag and drop development via visual designers is common and also provides a separation of web content and web page GUI logic. The key features of web forms include:

* Mature technology
* Rich toolset & controls
* Event driven model
* Easy state management
* Abstracts HTTP
* Feels like Windows development


ASP.NET MVC

MVC (Model View Controller) isn’t a Microsoft technology (and, it’s not even new). , it’s a pattern for web page creation that’s been around for some time now in other frameworks and just recently implemented in ASP.NET. As a developer using MVC you can get a ‘closer to the metal’ experience and finely tuned control of the HTML output, which will be exactly as you define it. Whereas web forms renders output based on your selections of controls and code, MVC is primarily your code with some HTML interspersed, so you get control of each pixel that’s rendered.

The three features of MVC, the model, view and controller are described here…

* The Model can be thought of as the data. This is going to be your fat layer, with all the goodies in it.
* The View is the UI representation of the Model. The view will render the model along with HTML, JavaScript and other page elements.
* The Controller chooses the view to be rendered and responds to user input. The view also manipulates the model, as needed, so the controller is the component that ties the Model and View together. The controller will be the most lightweight code-wise of the three.

As you can see, the MVC approach requires you to work with three objects rather than just one object (the page object) as web forms does. This object trio does give you some advantages over the traditional model:

* It’s testable, you can unit test easily
* Clear separation of concerns
* Control your output exactly
* Map URLs logically or dynamically
* Supports many web forms features (auth, caching, etc…)
* More geeky, higher coolness factor

Read More...

Monday, November 17, 2008

What is difference between ExecuteReader, ExecuteNonQuery and ExecuteScalar.

1. ExecuteReader : Use for accessing data. It provides a forward-only, read-only, connected recordset.

2. ExecuteNonQuery : Use for data manipulation, such as Insert, Update, Delete.

3. ExecuteScalar : Use for retriving 1 row 1 col. value., i.e. Single value. eg: for retriving aggregate function. It is faster than other ways of retriving a single value from DB.

Read More..

Monday, November 10, 2008

New version of Enterprise Service Bus software extends the Microsoft .NET Platform

Neudesic, a leading provider of business solutions that leverage the capabilities of the Microsoft product line, announced today the release of version 2।0 of Neuron-ESB. Neuron-ESB is an Enterprise Service Bus that extends the Microsoft Platform by providing real-time messaging, integration and web service management. Neuron-ESB accelerates SOA adoption by helping companies successfully implement real-time integration across their enterprise, allowing timely response to changing events within their business.

Neuron-ESB is built on the Microsoft Windows Communication Framework (WCF) technology to provide real-time reliable messaging options for companies adopting SOA। Neuron-ESB manages all communication over the bus by sending messages over "Topics" using a publish-subscribe pattern and supports federated, geographic deployments। Neuron-ESB helps companies administer and automate complex tasks and is proven to significantly reduce the infrastructure, development, training and long term support costs for businesses developing SOA solutions.

"Neuron-ESB provides the messaging backbone for all of our critical applications," said Jeffrey Sullivan, Chief Information Officer of ThinkCash. "Neuron-ESB allowed us to leverage our developers much more effectively while providing us the ability to go to market quickly with new solutions. We were able to shift our service development from the architect role to the more ubiquitous developer role while, decreasing our deployment time of new services by 50%. We started with just 1 developer who received 4 days of Neuron-ESB training. Within 6 months and no additional training, we had a 15X increase in the number of our internal developers who were able to use Neuron-ESB."

Read More..

Friday, November 7, 2008

Google Maps and ASP.NET

What makes the service even better is the availability of the Google Maps API (Application Programming Interface) as a free Beta service. The API allows developers to embed Google Maps in their custom applications. It also allows them to overlay information on the map and customize the map to their needs. As I write this article there are quite a few sites that utilize Google Maps, and more and more of them are appearing by the day.

The API by itself is pretty straightforward and easy to use; however, it requires the developer to have a good command of JavaScript because it extensively relies on client-side Java scripting. In this article we will be looking at building a custom ASP.NET server control that would allow a .NET developer to harness the power of Google Maps in the code-behind model. We will see how to accomplish most of the functionality exposed by Google Maps using this control, and we'll also see how to data bind the control, thereby allowing developers to easily build data-driven custom ASP.NET Web applications. The control would eliminate the need for the developer to write any JavaScript to accomplish most of the Google Map functionality.

Some Google Maps Basics
Before we get into the details of the ASP.NET control, let's look at the basics of the Google Maps API. A detailed description of the API can be found at www.google.com/apis/maps/documentation/. The first step before using Google Maps is to register for a key with Google (www.google.com/apis/maps/signup.html). This is absolutely free and hardly takes a few minutes. Each Web site that uses Google Maps has to have its own key. Make sure that you go through Google's Terms of Use (www.google.com/apis/maps/terms.html) before you start using Google Maps in your application.

Read More..

Tuesday, November 4, 2008

What's new in .NET Framework 3.5 SP1?

SP1 advances the art of application development
The new ADO.NET Entity Framework feature in SP1 offers developers a model-based paradigm and a rich, standards-based framework for creating data-oriented applications shared across multiple applications and platforms. The separation of presentation, data, and business logic used in concert with a single data model will enable developers to spend less time writing plumbing code and more time refining business logic.

SP1 makes data-driven programming easier
SP1 offers developers support for ASP.NET Dynamic Data, which provides a rich scaffolding framework that enables rapid data-driven development. Since ASP.NET takes care of creating the presentation layer, a fully functional Website is output and ready for customization without the developer writing a single line of code. Further, with ADO.NET Data Services, Web developers can create RESTful Web 2.0-style applications that have better server scalability and improved caching support.

SP1 is the fastest and easiest way to deploy Windows applications
With the .NET Framework Client Profile, a small subset of the Framework that powers client applications, developers can offer their end users a dramatically streamlined and rapid application download experience. In addition, improvements in SP1 result in dramatic reductions in cold start times, allowing developers to serve a broader set of customers with varying hardware profiles.

Read More..

Sunday, November 2, 2008

Introducing the "DotNetNuke" Web Application Framework

Web Application Framework is a robust software library used as the basis for building advanced Web applications. A Web Application Framework typically contains a well-defined architecture and an abstract set of reusable components that are specifically designed to simplify development, enforce consistency, increase productivity, and improve application quality. Typical features include modular architecture, membership management, security and role management, site organization and navigation, error and event logging, data access and caching, search and syndication, and extensibility at every level. Frameworks are used in corporations, public sector, private sector, small businesses, nonprofit organizations, and even individual Web sites.

Although the concept has always been relevant, Web Application Frameworks have just come back into favor in recent years. This is likely a result of the ever-pervasive basic business philosophy emphasizing a reduction in the Total Cost of Ownership and increase in the Return On Investment. Web Application Frameworks can provide big wins in both of these categories because they allow developers to focus on the high-level business processes while leveraging a rock-solid application foundation.

DotNetNuke is a Web Application Framework that provides a highly extensible development environment, based on published standards and proven design patterns. Since Web Application Frameworks are generic by nature, they can be used as the underpinnings for any number of powerful Web applications. From Community Portals to high volume E-Commerce shopping malls, from Content Management Systems (CMS) to Customer Relationship Management Systems (CRM), the DotNetNuke Web Application Framework provides the fundamental services to build highly functional and scalable Web applications. To back up this claim, the DotNetNuke Web Application Framework is distributed as part of a fully functional CMS - the DotNetNuke Enterprise Portal.

Introducing DotNetNuke
Necessity is the mother of invention. In classic open source fashion, I originally created the application because I was interested in a way to provide functional Web sites to amateur sports organizations and could not find a suitable proprietary alternative. After investing significant effort only to discover that my business goals were not going to be realized, I decided to release the application as an open source community project. Version 1.0 of DotNetNuke was released December 24, 2002 (Christmas Eve). Since then, DotNetNuke has evolved at an exponential rate, recently surpassing 200,000 registered users, 800,000 downloads, and maintaining a consistent weekly project activity rank of #15 on SourceForge.Net.

Read More..

Saturday, November 1, 2008

How to Convert Your Site To A MasterPage Site in 3 Steps

Once you have your design converted into HTML/CSS, why should you have to worry about breaking it every time you create a new page? Abstract yourself from this with MasterPages, while still enabling yourself to easily make design changes. MasterPages are wonderful for standardizing your site and your design, in addition to making it easier to maintain and to build new pages. They are a very powerful and easily customizable way to template your site. This article is for those who don’t have much or any experience with MasterPages or are converting an old ASP.NET site to a MasterPage-driven site. If this is you, don’t be afraid—You can do it in just three easy steps!
1. Create a new MasterPage

Right click your project, go to “Add” and then “New Item…” and select MasterPage. Name it something useful, like “main.master” and hit ok. You should be presented with a barebones XHTML skeleton. Notice that your skeleton has this tag in it: . This is the location where your content will be loaded from your .aspx pages. Fill your new MasterPage with the XHTML that you wish to use on every page. If you want some things to change based on certain variables, you can do so in the codebehind. Treat the MasterPage like any other .aspx page. The only thing different about it (on a basic level) is that it does not contain your content, but rather what encompasses your content.
2. Link your old pages to your MasterPage in the Page Directive

In your <%@ Page directive, add the following attribute: MasterPageFile="~/YourMasterPage.Master"
3. Tell the MasterPage What Content Goes Where

If you only have one ContentPlaceHolder, you will add the following tag around all of your content in your .aspx pages: Hello, World!, where “ContentPlaceHolder1″ is the ID of the placeholder in your MasterPage that you linked to in step 2. If you have more than one ContentPlaceHolder in your MasterPage, simply wrap the tags around the correlating content.

And that’s it! That’s really all there is to it! Just apply steps 2 and 3 to each of your .aspx pages. There is an optional step for those who may have changed their pages’ codebehind inheritance:

Read More..

Friday, October 24, 2008

Microsoft's SharePoint Products and Technologies to Deliver .NET-Based Enterprise Portal Framework

Microsoft Corp. has announced the product strategy for the next version of SharePoint® Products and Technologies, the company's enterprise portal and collaboration solution. The next version of SharePoint utilizes the application server technologies in Windows® .NET Server to deliver a robust portal and collaboration framework based on Microsoft® .NET. SharePoint Portal Server and SharePoint Team Services will be tightly integrated, providing a unified environment that connects users to information, enterprise applications, and collaborative tools throughout the enterprise.

Since the introduction of SharePoint Products and Technologies one year ago, tens of thousands of SharePoint Team Services Web sites have been deployed in organizations around the world, and SharePoint Portal Server has sold more than 3 million seats.

The next version of SharePoint Portal Server will deliver a highly scalable and customizable portal application with information aggregation, advanced search capabilities, and mainstream enterprise application integration, provided via integration with Microsoft BizTalk® Server. Additional improvements include single sign-on, personalization, and integration with Microsoft Content Management Server, building on the Content Management Server with SharePoint Portal Server 2001 Integration Pack.

Read More..

Monday, October 20, 2008

Web Frameworks, MVC, and ASP.NET

After nearly a year as a community tech preview, Microsoft has released the first true beta of the ASP.NET MVC framework. ASP.NET MVC is a radical departure from the WebForms technology has promoted in the past, and in the opinion of many, a return to mainstream web programming. The MVC pattern provides the cornerstone for web frameworks such as Ruby on Rails and Java's Spring Framework.

MVC web frameworks should not be confused with their namesake, the Model-View-Controller pattern first proposed by Trygve Reenskaug. Under Reenskaug's pattern, the view and controller were tightly bound to one another with a one-to-one mapping between each view and controller. With a MVC web framework, the view and controller are loosely coupled and it is not unheard of for multiple views to be tied to a single controller.

Regardless of which definition of MVC you prefer, the model remains an independent representation of data that has no knowledge of what is using it. This is in contrast to WebForms, where it is common for data to be stored in the UI elements themselves in the form of viewstate. Read More...