Pages

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

Thursday, October 28, 2010

The .NET Framework

The .NET Framework, introduced by Microsoft in 2002, is a programming platform and set of tools for building and running distributed applications in the Internet era. It also contains an object-oriented class library and a collection of reusable types (a type is a representation of data such as classes) that enable you to accomplish many common programming tasks such as file access, string manipulation, and database management. The class library is categorized into modules (referred to as namespaces) and includes types that support a variety of applications such as:

  • Console applications
  • Windows forms
  • ASP.NET applications
  • XML web services
  • Windows services
  • SQL Server applications
  • Small device applications

In fact, C# is one of the .NET languages that Microsoft developed. The other languages that use .NET are Visual Basic .NET, J#, and Managed C++, in addition to languages developed by other companies. (See more details on the web site: http://www.dotnetpowered.com/languages.aspx). All these languages work under the .NET umbrella and use its libraries. Actually, you can write an application with modules written in different languages that support .NET.


In addition to the class library, the .NET Framework includes the Common Language Runtime (CLR), an integrated environment for executing applications using the .NET library.


There are other versions of the .NET Framework that work with operating systems other than Microsoft Windows, such as Mono. Mono can run on operating systems such as Mac OS X and Linux. There is also a subset of the .NET Framework called the Microsoft .NET Compact Framework that can be used with small devices and smart phones. There is even a Micro Framework for extremely low-power devices, such as watches.
Share/Bookmark

Keep Smiling Always



In the picture, just look at their condition.. no place to sleep, still they have 

made some space for the cat & the dog... water poring from the roof but still 
each 1 of them have a peaceful smile on their face.. Simply amazing!!!!! 


The happiest people in the world are not those who have no problems, 
but those who learn to live with things that are less than perfect.

Keep Smiling Always.

Share/Bookmark

Wednesday, October 27, 2010

Design Patterns

Design patterns are recurring solutions to software design problems you find again and again in real-world application development. Patterns are about design and interaction of objects, as well as providing a communication platform concerning elegant, reusable solutions to commonly encountered programming challenges. 

Model-view-presenter (MVP) 

Model-view-presenter (MVP) is a user interface design pattern engineered to facilitate automated unit testing and improve the separation of concerns in presentation logic. 
  • The model is an interface defining the data to be displayed or otherwise acted upon in the user interface. 
  • The view is an interface that displays data (the model) and routes user commands (events) to the presenter to act upon that data. 
  • The presenter acts upon the model and the view. It retrieves data from repositories (the model), persists it, and formats it for display in the view. 

Model–View–Controller (MVC) 

is a software architecture, currently considered as an architectural pattern used in software engineering. The pattern isolates "domain logic" (the application logic for the user) from input and presentation (GUI), permitting independent development, testing and maintenance of each.

The model is the domain-specific representation of the data upon which the application operates. Domain logic adds meaning to raw data (for example, calculating whether today is the user's birthday, or the totals, taxes, and shipping charges for shopping cart items). When a model changes its state, it notifies its associated views so they can be refreshed.

Many applications use a persistent storage mechanism such as a database to store data. MVC does not specifically mention the data access layer because it is understood to be underneath or encapsulated by the model. Models are not data access objects; however, in very simple apps that have little domain logic there is no real distinction to be made. Also, the ActiveRecord is an accepted design pattern which merges domain logic and data access code - a model which knows how to persist itself.

The view renders the model into a form suitable for interaction, typically a user interface element. Multiple views can exist for a single model for different purposes.

The controller receives input and initiates a response by making calls on model objects.

An MVC application may be a collection of model/view/controller triplets, each responsible for a different UI element.

MVC is often seen in web applications where the view is the HTML or XHTML generated by the app. The controller receives GET or POST input and decides what to do with it, handing over to domain objects (i.e. the model) that contain the business rules and know how to carry out specific tasks such as processing a new subscription.

Share/Bookmark

Tuesday, October 26, 2010

Popular Structural Elements in Web Programming (1)



The elements in this section are used to provide structure in a web page, for instance, indicating sections on a page with a heading, creating a paragraph, and so on. These are the basic building blocks that you’ll find yourself using on any web page.
  • body

The body contains all the content that’s to be made visible to the user:


<body>
<h1>101 Ways to make a paper aeroplane</h1>
<p>Let's start with the basics …</p>

</body>




  • blockquote

<blockquote >
some text
</blockquote>


The blockquote element is a mechanism for marking up a block of text quoted from a person or another document or source. It may be just a few lines, or it may contain several paragraphs.

  • <br/>


The br element’s purpose is very simple: it creates a line break within a block of text, leaving no padding or margins between the two blocks of text created by the line break.
  • div
The div is a generic block-level element. The div element is currently the most common method for identifying the structural sections of a document and for laying out a web page using CSS.


  • Headings
There are six different levels of heading <h1> through <h6>. <h1> being the largest
  • <hr/>
The hr element creates in the document a highly visible break that renders as a slim horizontal line running the width of the area to which it’s applied.
  • p
The p element is one of the most commonly used building blocks of HTML. When you use the p element to begin a new paragraph in HTML, it automatically creates some space above and below the content.





Share/Bookmark

Saturday, October 23, 2010

Elements or Tags

<head> Elements



  • <Base>

<base href="http://lloydi.com"/>
provides a method for defining the base URL for all links and form submissions on a page.

  • <link>
<link href="uri" media="media types"
rel="relationship" rev="relationship" type="content  type"/>
The link element is used to create links between the referencing document and an external resource.

  • <meta>
<meta content="string" { http-equiv="http response header" | name="string" } />
The meta element provides information about the following document content; that information may be used by the user agent (that is, the browser) to decide how to render content, or it may be meta information that’s provided for indexing purposes—for example, to provide keywords that relate to the document for use by search engines.

Share/Bookmark

Friday, October 22, 2010

Hyper Text Markup Language (HTML)

  • HTML was primarily created for displaying textual pages to users. As the growth of WWW HTML is also modified to cop the modern age’s needs. 
  • Still its  a presentational language.
  • To make it dynamic Java Scripts are introduced.
Basic Part of HTML Page:
<html> tag is the root tag of a html page.
  • <html> tag contains:
    • <head> tag
    • <body> tag
Basic Parts of HTML Page <head> tag:
The head element contains meta data information that describes the document itself, or associates it with related resources, such as scripts and style sheets.

<head> Elements:
  • base
  • link
  • meta
  • script
  • style
  • title




Share/Bookmark

More About HTTP

  • HTTP is the Protocol for WWW.
  • HTTP is a stateless protocol.
  • HTTP provides 04 methods to interact with a web resource.
  • Get 
    • (Call to get a resource, Cacheable, Idempotent)
  • Put 
    • (Call to Update a resource if exists. Create otherwise, Idempotent)
  • Post 
    • (Specification not provided)
  • Delete 
    • (Call to Delete a resource, Idempotent)



Share/Bookmark

Response Header Fields

The first line of the server’s response contains a status code



200 OK                             request was processed successfully

301 Moved permanently      document has been moved

304 Not modified                if cached version is up-to-date

400 Bad request                 syntax error in client’s request

403 Forbidden                    client is not allowed access (e.g., protected)

404 Not found                    file could not be found

500 Internal server error      server failed

503 Service unavailable       server is overloaded

In addition to the status code, the server’s response may include



Date  response time (in GMT)


Server  identification info on the server


Last-modified  time document was last changed (in GMT)


Content-length  size of document, in bytes


Content-type  file format (e.g., html, gif, pdf)


Expires  prevents browser from caching beyond date

Share/Bookmark

GET Request

Most URL’s (Uniform Resource Locator) have the form:    


                  protocol://serverName URI 


e.g., http://www.csc.liv.ac.uk/~martin/index.html


To retrieve a document via HTTP from the server, we can issue a GET request using the HTTP protocol


                               GET URI HTTP/1.1
                               Host: serverName

Web server only knows the contents of the GET request message

  • this request is automatically generated by browser when you select a URL
  • could also come from a link checker, a search engine robot, …
  • can come directly from a telnet connection using port 80

Share/Bookmark

Hyper Text Transfer Protocol (HTTP)

  • Hypertext Transfer Protocol (HTTP):
    • application-level protocol for distributed, collaborative, hypermedia information systems
    • generic, stateless, object-oriented
    • can be used for many tasks, such as name servers & distributed object management systems
    • underlying language of the Web
  • HTTP/1.0 allows only connectionless message passing
    • each request/response requires a new connection
    • to download a page with images requires multiple connections
      • can overload the server, require lots of overhead
  • HTTP/1.1 provides persistent connection by default
    • once client & server connect, remains open until told to close it (or timeout)
    • reduces number of connections, saves overhead
    • client can send multiple requests without waiting for responses
      • e.g., can request all images in a page at once

Share/Bookmark

Server-side Programming

  • Server Side Programming can store and execute program on Web server, link from Web page
    • more complex, requires server privileges, but can still be (mostly) secure
  • Common Gateway Interface (CGI) programming
    • programs can be written to conform to the CGI
    • when a Web page submits, data from the page is sent as input to the CGI program
    • CGI program executes on server, sends its results back to browser as a Web page
    • good if computation is large/complex or requires access to private data
    • see http://hoohoo.ncsa.uiuc.edu/cgi/
  • Active Server Pages (ASP), Java Servlets, PHP, Server Side Includes, Ajax
    • some of these are vendor-specific alternatives to CGI (such as ASP)
    • provide many of the same capabilities but using HTML-like tags
    • some of these technologies might require functionality to be enabled in the client’s browser (e.g. Ajax generally requires the use of Javascript)


Share/Bookmark

Client-Side Programming





  • JavaScript
    • a scripting language for Web pages, developed by Netscape in 1995
    • uses a C++/Java-like syntax, so familiar to programmers, but simpler
    • good for adding dynamic features to Web page, controlling forms and GUI
    • requires users to have this technology enabled on their browsers
    • see http://www.w3schools.com/js/
  • Java applets
    • can define small, special-purpose programs in Java called applets
    • provides full expressive power of Java (but more overhead)
    • good for more complex tasks or data heavy tasks, such as graphics
    • see http://java.sun.com/applets/

Share/Bookmark

A Very Brief History of Web (continue)

  • the Web was an obscure, European research tool until 1993
  • in 1993, Marc Andreessen and Eric Bina (at the National Center for Supercomputing Applications, a unit of the University of Illinois) developed Mosaic, one of the early graphical Web browsers that popularized the WWW for the general public (Erwise was the first one, ViolaWWW the second)
    • the intuitive, clickable interface helped make hypertext accessible to the masses
    • made the integration of multimedia (images, video, sound, …) much easier
    • Andreessen left NCSA to found Netscape in 1994
      • cheap/free browser further popularized the Web (75% market share in 1996)
  • in 1995, Microsoft came out with Internet Explorer
  • Opera web browser released in 1996
  • Netscape bought by AOL in 1998 for US$4.2 billion in stock 
  • Firefox web browser, version 1.0, released in 2004

Share/Bookmark

Web is not equal to Internet

Internet : a physical network connecting millions of computers using the same protocols for sharing/transmitting information (TCP/IP)
  • in reality, the Internet is a network of smaller networks
World Wide Web: a collection of interlinked multimedia documents that are stored on the Internet and accessed using a common protocol (HTTP)

Key distinction:  Internet is hardware;  Web is software

Many other Internet-based applications exist
e.g., email, telnet, ftp, usenet, some instant messenging services,…


Share/Bookmark
Related Posts Plugin for WordPress, Blogger...

Popular Posts

Share |