Showing posts with label web programming. Show all posts
Showing posts with label web programming. 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...

Friday, January 23, 2009

Caching in Asp.net

ASP.NET gives you the ability to cache the output of pages or portions of pages in memory to improve performance.

The main reason to cache is to reduce the latency and increase the scalability of an application while reducing the server resources required to deliver its page content.

Latency is a measure of the time it takes for an application to respond to a user request. Scalability is the ability of an application to handle increased numbers of users.

If a page is cached on the server, the rendered HTML stored in memory is served instead of a freshly generated page from the server. Because it takes less time for the client to get the page and display it, your web site will seem more responsive.

If pages are completely static, deciding to cache them is a no-brainer. But the decision gets trickier if pages must vary their content in response to one of the following:

-Query string parameters

-Client browser type (e.g., Internet Explorer, Netscape, and so on)

-Custom parameters

-Database content

Read MOre..

Monday, December 1, 2008

Fixing the Enter Keypress Event in ASP.NET with jQuery

One of the most frustrating things about working with .NET from a front-end developer’s viewpoint is the Single Form Model. Enclosing an entire website or web-application in one single
element poses a number of accessibility and usability problems surrounding form input and usage. One of these is ensuring the correct default actions are assigned to sets of input fields when the enter key is used.

Traditionally, the default action for a is to fire the first submit button found within the current element. Every form has one default action.

Striking the enter key within a text input field should submit the current set of—logically grouped—fields; this is the expected behaviour. For pages with multiple forms and actions, this is easily separated by having multiple elements, each with their own submit buttons and actions. Each form operates independently, has its own default action, and doesn’t interfere with other forms.

In the Single Form Model, the presence of just one element, means that different default actions cannot be easily separated. Every input field on the page is automatically tied to just one default action – the first submit button on the page.

Take a blog site as an example – like this very page! It has a search form at the top, with associated submit button, a comment form further down the page and perhaps another form for signing up to a newsletter. Implemented with the Single Form Model, only the search form will produce the correct behaviour as it introduces the first submit button on the page. All subsequent fields will be tied to this same button as their default action – submitting a comment by pressing enter would cause the search form to submit, as would signing up to a newsletter. Not particularly useful.

Read More..

Thursday, November 13, 2008

Uploading In ASP.NET

With classic ASP, uploading a file from the client to a server required one of three approaches: use of a third-party COM component, use of a custom-written component, or (messy) script code. The easiest option providing the most features was to use a third-party COM component, such as SA-FileUp or ASPUpload. Problems with using the COM model for Web application components are numerous. First off, these components must be registered (generally using the regsvr32.exe tool) before they can be used from a conventional ASP application. Remote administration of these types of applications is not possible, because the registration tool must be run locally on the server. These components remain locked on disk once they are loaded by an application, and the entire Web server must be stopped before these components can be replaced or removed. Furthermore, these third-party COM components cost money.

ASP.NET easily allows developers to provide upload support without the need of any COM component. This is accomplished via the HtmlInputFile class in the .NET Framework. An instance of this class can be created and used easily through an ASP.NET Web page in just a few lines of code. In this article we'll examine how to upload a file from the client to the Web server using ths server control. We'll also examine how to add some extra functionality, such as creating the upload directory.

Read More..

Wednesday, November 12, 2008

ASP.NET Web Forms Weaknesses


The Weakness of ASP.NET Web Forms


On the whole, the weakness of the traditional ASP.NET Web Forms solution mainly lies in the following four aspects. Let's check each of them one by one.

(1) ViewState and Postbacks

Maybe the most disputable point people often bring forward about ASP.NET Web Forms relates to ViewState and Postbacks. To introduce an event-driven approach and overcome the stateless nature (and also obstacle) of HTTP protocol to simulate the old Windows form model development experience, ASP.NET Web Forms introduces ViewState and Postback. The end result is both ViewState and Postbacks have caused lots of problems and increased the complexity of web application development. Even simple web pages can produce a ViewState larger than 100KB in size that heavily affects the performance of the application sometimes.

Is ViewState is a must have in an ASP.NET application? In fact, most existing web pages usually feature a good many hyperlinks. When you click one of the links, you will be navigated to a new page. Since clicking the links will lead you to another page, what is the use of ViewState within the page? In practice, when I start to write a new web project, the first thing I do is turn off the enableViewState (and sometimes enableSessionState) parameter from inside the Web.config file.

Some may ask me what sense there is to using Web Forms since I turn off ViewState. My answer is: there are many reasons. Web Form provides a control model, and so users can take advantage of the easy-to-grasp mode to set/get the value of a text box, and also, they can use many button events easily to write related event handlers to trigger various business logics. Moreover, using Web Forms is simple and clear.

Well, without ViewState why can you use the events of the controls? Of course, you can if the events are not complex ones. Here is an example. The TextBox's TextChange event belongs to complex events, as well as the Command event of the GridView control. However, the click event of a Button control is the "simple event."

As with the event, there are also complex states and simple ones. Take, again, for example: the state of each sub-control within each line inside the GridView control is a "complex state," while the Text property of a TextBox control belongs to a "simple state." "Complex states" and "complex events" require ViewState, while the simple ones do not. So, why not try to use simple states and events instead of complex ones?

One of the most prominent and significant features of ASP.NET Web Forms lies in its powerful (and complex) component model. Inside this model was introduced something named "page life cycle." Many people threw stones at it and accused it of killing system performance. In essence, this complex life-cycle does, at some times, run without any efficient result again and again. However, assuming that the ASP.NET "page life cycle" kills performance is not right.

Read More..

Friday, November 7, 2008

ASP.NET Is The Latest Version Of ASP Technology

ASP.NET is the next generation ASP, but it's not an upgraded version of ASP. ASP.NET is an entirely new technology for server-side scripting. It was written from the ground up and is not backward compatible with classic ASP.ASP.NET is the major part of the Microsoft's .NET Framework.
ASP.NET is a server side scripting technology that enables scripts (embedded in web pages) to be executed by an Internet server.

•ASP.NET is a Microsoft Technology
•ASP stands for Active Server Pages
•ASP.NET is a program that runs inside IIS
•IIS (Internet Information Services) is Microsoft's Internet server
•IIS comes as a free component with Windows servers
•IIS is also a part of Windows 2000 and XP Professional

ASP.NET 2.0 improves upon Asp.Net by adding support for several new features and ASP.NET 3.0 is not a new version of ASP.NET. It's just the name for a new ASP.NET 2.0 framework library with support for Windows Presentation Foundation, Windows Communication Foundation, Windows Workflow Foundation; and Windows Card Space.

Benefits of ASP.Net

•ASP.NET has better language support, a large set of new controls and XML based components.
•ASP.NET provides increased performance by running compiled code.
•ASP.NET code is not fully backward compatible with ASP.
•Event-driven programming
•User authentication, with accounts and roles
•Higher scalability
•Easier configuration and deployment


Read More..

Sunday, November 2, 2008

GridView Control

In MySQL, you would need to supply the LIMIT keyword in order to get a specific set of rows. With GridView’s paging feature enabled, everything is done for you. Neat huh. Took me like a day in getting this one to work though because I had problems with the update and delete function. Since I am using MySQL, turns out when you do parameters in your query commands, the @ sign does not work because it is only for MS SQL. You would have to change the @ to ?.

Read More..

Friday, October 24, 2008

ASP.NET development Benefits

Microsoft ASP.NET is a free technology that allows programmers to create dynamic web applications. The revolutionary technology has been designed to hook up businesses, employees, customers and partners in one loop, through use of web services. It is said to have enough fire power to build, deploy, manage, and use connected, security-enhanced solutions with web services.

What is ASP.NET? ASP.NET stands for Active Server Pages .NET and is developed by Microsoft. ASP.NET is used to create web pages and web technologies and is an integral part of Microsoft's .NET framework vision. As a member of the .NET framework, ASP.NET is a very valuable tool for programmers and developers as it allows them to build dynamic, rich web sites and web applications using compiled languages like VB and C#.

ASP.NET helps to bring out the real world web applications in documentation time.
Stretchy Language Options – ASP.NET allows empowering the existing programming language skills. Different classic ASP, which abets barely, interpreted JAVA Script and VB Script at present ASP.NET abets more than twenty five .NET languages which also includes built-in support for C# which is called as C sharp, Visual Basic.NET and JAVA Script and also it does not requires any tool. Thus it gives an extraordinary litheness in the selection of language.

Read More...

Sunday, October 19, 2008

ASP.NET MVC Web Site Template

The first, and most obvious step, is to install the ASP.NET MVC Beta. Once that’s installed, fire up Visual Studio 2008 and create a new Web Site. Once the project is up and running, add references to the following assemblies:

System.Web.AbstractionsSystem.Web.MvcSystem.Web.Routing
In the default install of the MVC Beta, these assembles are all found in %ProgramFiles%\Microsoft ASP.NET\ASP.NET MVC Beta\Assemblies.

Now it’s time to make modifications to the Web.config to add the HTTP Modules, Handlers, and namespaces for each WebForm/ViewPage. Read More..

Friday, October 17, 2008

Microsoft PDC to feature various technologies

Microsoft bills its upcoming Professional Developers Conference as a gathering of developers and architects and a chance to understand the future of Microsoft's platform. From this backdrop, the Los Angeles conference, which begins on October 26, is set to feature insights on a host of technologies ranging from model-driven software development to cloud computing and the Windows OS.

Highlights include a Community Technology Preview of Microsoft's "Oslo" software modeling platform, as well as sessions on the company's "Dublin" application server extensions for Windows. Microsoft's planned cloud OS, dubbed "Red Dog," also is expected to draw a lot of attention.

In some cases, technologies from different spaces will mesh together at the conference, such as during a session entitled, " 'Dublin' and .Net Services: Extending On-Premise Applications to the Cloud." Read More..

Microsoft dances with open source businesses

Open source businesspeople are frustrated that their business models is not bringing them enormous returns. Microsoft perceives the threat of open source and wants to neutralize it.

If “we’re all mixed source companies” then there is no real difference between Microsoft and, say, Red Hat. Microsoft wants merely to share its profit secrets with anyone who is interested in making money rather than political points.

Thus its well-timed release of Web platform installers which can get open source developers conversant with tools like ASP .Net, Silverlight, and the .Net Framework.

Read More..

ASP.NET software blog

Of all the different types of applications on the market today, many people feel that Microsoft recently released ASP.NET blog, the software is the most advanced. In many ways, that individual is more flexible and more versatile than any other blog software on the market. Although most people who are under the programmer, with programming languages such as HTML and C, the new Microsoft program is much easier than using a host of other blogs to software design, Hands - on-programming. One of the things
ASP.NET that are independently of its competitors is that designers can use many Programming languages, if it built a blog. This means that a greater number of programmers in achieving their Wish programming in the language with which they are best and most reached.

Read more..

Tuesday, October 14, 2008

An Introduction to AJAX and Atlas with ASP.NET 2.0

Traditionally, web applications have left a lot to be desired from a user experience standpoint, due primarily to the "request/response" life cycle. Any interaction with a page typically requires a post back to the web server (a "request"), which then performs any server-side tasks needed and returns the updated page's markup (the "response"). Outside of intranet-based applications, such behavior adds a bit of a lag when interacting with a page. One approach to improving the end user's experience is to use AJAX. AJAX is a technique for using JavaScript and the XMLHttpRequest object to make light-weight HTTP requests back to the web server from client-side script. Once a response is received, the web page's layout can be seamlessly refreshed using JavaScript to message the page's Document Object Model (DOM) and CSS settings. AJAX-enabled pages provide a slick, responsive user experience, making web-based applications function more like desktop-based ones.
Reading continue..

Friday, October 10, 2008

Application Software Development

Application software is a subclass of computer software that employs the capabilities of a computer directly and thoroughly to a task that the user wishes to perform. This should be contrasted with system software which is involved in integrating a computer’s various capabilities, but typically does not directly apply them in the performance of tasks that benefit the user. In this context the term application refers to both the application software and its implementation.

There are many subtypes of application software:

Enterprise software addresses the needs of organization processes and data flow, often in a large distributed ecosystem. (Examples include Financial, Customer Relationship Management, and Supply Chain Management). Note that Departmental Software is a sub-type of Enterprise Software with a focus on smaller organizations or groups within a large organization. (Examples include Travel Expense Management, and IT Helpdesk)

Read more..

Thursday, October 9, 2008

Beginning Ajax with ASP.NET

Ajax has the power to revolutionize the way web-based applications are designed. This book provides you with a thorough working knowledge of what Ajax has to offer and how to take full advantage of it in your application development.

Read more...

Asp.net Web User Control

If you use classic asp, we create include file in asp. Web user control is a replacement for the include file feature in Asp. Though the model is similar with asp include page, Web User Controls have a lots of new features. You can embed them Asp.Net Web Pages, where they act as unit.

to create Asp.net User Controls is very easy. Open Vusial Studio IDE and then open or create Asp.Net Web Site. Right click on the project ,click add new item and then choose Web User Control select the programming language which you want to use.

Read more about this..

Mono 2.0 Released

It's now loosely compatible with .NET Framework 3.5

The open source Mono project that makes Microsoft's .NET development framework cross-platform - and is meant to entice Windows developers to Linux by making things seem warmly familiar - is now loosely compatible with .NET Framework 3.5.

It lacks Windows Presentation Foundation, Workflow Foundation and Communication Foundation. Read more...

SpreadsheetConverter ASP and ASP.NET Std

Solve your problem using Microsoft Excel, and let SpreadsheetConverter generate an ASP or ASP.NET-page. The ASP-page looks like and calculates like the spreadsheet. No programming required. Easy updating, fix spreadsheet and generate. Supports 190 Excel-functions. Read more...

Murach’s ASP.NET 3.5 Web Programming

As its title implies, this book presents all of the best new ASP.NET 3.5 features as it teaches web programming. That includes the ListView and DataPager controls that allow for complex data handling; LINQ data sources for accessing data using C# constructs; new tools for working with cascading style sheets (CSS); and an introduction to ASP.NET AJAX that shows how it can improve the performance of web applications.

Read more...