Monday, January 16, 2012

Software Required for Developing our ASP Ecommerce Application



  • IIS
  • Microsoft Transaction Server (MTS)
  • Dreamweaver
  • Microsoft SQL Server 2008
  • Microsoft Visual Basic 6.0

IIS

Formerly called Internet Information Server – is a web server application and set of feature extension modules created by Microsoft for use with Microsoft Windows. IIS 7.5 supports HTTPHTTPSFTPFTPS,SMTP and NNTP. It is an integral part of Windows Server family of products, as well as certain editions of Windows XP,Windows Vista and Windows 7. IIS is not turned on by default when Windows is installed.

MTS

Microsoft Transaction Server (MTS) was software that provided services to Component Object Model (COM) software components, to make it easier to create large distributed applications. The major services provided by MTS were  automated transaction management, instance management (or just-in-time activation) and role-based security. MTS is considered to be the first major software to implement aspect-oriented programming

For more details please read my previous article on MTS dated, Monday, January 10, 2011

Microsoft SQL Server 2008:

This database product, rather than Microsoft Access, was chosen since it's a great product for use in building both small, but scalable, solutions and in the development of large distributed applications, like an e-commerce site. We use this database both for development and on the production server.

Microsoft Visual Basic 6.0

This will be used for building our business objects for the business tier of our application.

Dreamweaver

Macromedia Dreamweaver 8 is a professional HTML editor for designing, coding, and developing websites, web pages, and web applications. Whether you enjoy the control of hand-coding HTML or prefer to work in a visual editing environment, Dreamweaver provides you with helpful tools to enhance your web creation experience.

Dreamweaver also provides a full-featured coding environment that includes code-editing tools (such as code coloring and tag completion) and language reference material on Cascading Style Sheets (CSS), JavaScript, and ColdFusion Markup Language (CFML), among others. Macromedia Roundtrip HTML technology imports your hand-coded HTML documents without reformatting the code; you can then reformat code with your preferred formatting style.
Dreamweaver also enables you to build dynamic database-backed web applications using server technologies such as CFML, ASP.NET, ASP, JSP, and PHP.

Tuesday, January 10, 2012

Designing a scalable application




Imagine your traditional non-Web-based distributed application has ten users. Chances are your application works just fine in this environment - responses to queries are fast, print jobs run on time, etc. Now imagine your company gets absorbed into a much, much larger one and now your distributed application has 10,000 users. Will your application run just as fast and will your users be just as happy?

Well, no. Not without, at the very least, hardware upgrades. But, even after you redo all the server hardware, will your application still perform to specification?

If it doesn't (and chances are it won't), we say that the application does not scale well; in other words the application is not capable of adapting itself to fit into a new environment where there are more users. If the application copes, then we say it does scale well.

Scalability is important in many areas, but the consequences of ignoring it can be particularly acutely felt if you suddenly find yourself with a successful Web-based distributed application, like an e-commerce site, where the original traffic of
1,000 visits a day suddenly jumps to 10,000,000. How do you design your application in such a way that increases of that magnitude are manageable?

Luckily, you're half way there. The first step in managing that kind of increase is to adopt a 3-tier architecture. In short, by separating the business tier away from presentation and database roles, you can build business objects that work smarter
and scale better. The trick with managing scale is to think about the perceived number of users concurrently working on the system at any one time. Say you do have 10,000,000 visits a day. At any given second, 116 users are on that system.
Imagine all of these users are using the same page. How many database connections do you need? The answer: 116. Now, how many database connections will be required at the same time? The answer: less than 116.


The trick to designing business objects to scale well is to understand that the resources you have are limited. Say your installation of SQL Server can handle only 500 simultaneous connections. If a user needs a database connection and all
500 are in use, that user will have to wait in a queue for one to become available. That is why we often see such a reduction in performance when we start to increase the load on distributed applications - the demand for resources
outstrips supply.

Imagine I write a business object that takes 5 seconds to walk through a list of 100 invoices and performs a complex calculation on each one. If I connect to the database as I enter the CalculateRefund method and close it just before I leave, chances are I've wasted a lot of the database's time as I read one record, process it for a little while, get the next record, and so on. If I, instead, design my object to open the database, read and cache all the records, and close the Database, the database resource is being used efficiently. Now, as the resource is being used more efficiently, other pages servicing other users can obtain database connections more readily, reducing the performance lag we were previously feeling.

Coming back to our 10,000,000 visits example: if we can build our business objects to use the database efficiently, we may be able to reduce the number of simultaneous database connections required to always be below 500, and our application won't feel a performance hit when we scale.

Now that we understand the online business model we're after and we have an understanding of what a 3-tier distributed application is, we can move on to designing the software we'll need to make our site a reality.

Friday, January 6, 2012

Architecture model for E- commerce application





Let’s start considering the practical aspects of Ecommerce site construction. Let’s first discuss about the model we are going to use for our Ecommerce application. I found Three Tire model to be an extremely efficient development approach and is the one we'll be following in developing our ecommerce application

Let’s have a brief description of Three Tire model

The three-tier architecture model, which is the fundamental framework for the logical design model, segments an application's components into three tiers of services. These tiers do not necessarily correspond to physical locations on various computers on a network, but rather to logical layers of the application. How the pieces of an application are distributed in a physical topology can change, depending on the system requirements

·             The presentation tier, or user services layer, gives a user access to the application. This layer presents data to the user and optionally permits data manipulation and data entry. The two main types of user interface for this layer are the traditional application and the Web-based application. Web-based applications now often contain most of the data manipulation features that traditional applications use. This is accomplished through use of Dynamic HTML and client-side data sources and data cursors.

·             The middle tier, or business services layer, consists of business and data rules. Also referred to as the business logic tier, the middle tier is where COM+ developers can solve mission-critical business problems and achieve major productivity advantages. The components that make up this layer can exist on a server machine, to assist in resource sharing. These components can be used to enforce business rules, such as business algorithms and legal or governmental regulations, and data rules, which are designed to keep the data structures consistent within either specific or multiple databases. Because these middle-tier components are not tied to a specific client, they can be used by all applications and can be moved to different locations, as response time and other rules require. For example, simple edits can be placed on the client side to minimize network round-trips, or data rules can be placed in stored procedures.

·             The data tier, or data services layer, interacts with persistent data usually stored in a database or in permanent storage. This is the actual DBMS access layer. It can be accessed through the business services layer and on occasion by the user services layer. This layer consists of data access components (rather than raw DBMS connections) to aid in resource sharing and to allow clients to be configured without installing the DBMS libraries and ODBC drivers on each client

During an application's life cycle, the three-tier approach provides benefits such as reusability, flexibility, manageability, maintainability, and scalability. You can share and reuse the components and services you create, and you can distribute them across a network of computers as needed. You can divide large and complex projects into simpler projects and assign them to different programmers or programming teams. You can also deploy components and services on a server to help keep up with changes, and you can redeploy them as growth of the application's user base, data, and transaction volume increases