Tuesday, November 9, 2010

Migrating from PHP to ASP.NET- part1

Source: Microsoft Corporation


September 2003

Applies to:

Microsoft® ASP.NET

Microsoft Visual Basic® .NET

Contents

Introduction

Architecture Comparison

Feature Comparison

Comparing Syntax and Common Tasks

Data Caching and Page Caching

Summary

Recommended Next Steps

Resources

Introduction

This paper discusses the migration of PHP (PHP:Hypertext Preprocessor 4) to ASP.NET. It compares and contrasts the basic underlying syntax of PHP with Microsoft® Visual Basic® .NET, as well as the underlying functionality and architecture of the two systems.

While both PHP and ASP.NET allow you to build sophisticated and complex Web applications (like e-commerce sites, intranets, and corporate portals), PHP and ASP.NET have several major differences. Unlike PHP, ASP.NET is not a language or a parser but rather a set of technologies in the Microsoft .NET Framework for building Web applications and XML Web Services. Microsoft ASP.NET pages execute on the server like PHP and generate markup, such as HTML, WML or XML, which is sent to a desktop or to mobile applications. ASP.NET, though, is different in that it provides a robust, object-oriented, event-driven programming model for developing Web pages, while still maintaining the simplicity that PHP developers are accustomed to.

ASP.NET applications are based on a robust Object Oriented Programming (OOP) paradigm rather than a scripting paradigm. This allows for more rigorous OOP features, such as inheritance, encapsulation and reflection. While most basic and simple operations can easily be translated from PHP to ASP.NET, more complex applications will not be as simple to convert from PHP to ASP.NET and will require careful planning and consideration as well as a more OOP approach.

In this paper, we assume that the reader has experience with PHP as well as programming and software development in general. We begin this paper with a look at code with a short comparison of the underlying architectural differences and the OOP development model, followed by a feature comparison, and then a comparison of Syntax and Common tasks for developing Web applications with PHP and ASP.NET.

Note If you would like to skip the migration details, and simply test drive ASP.NET, feel free to jump to the Recommended Next Steps section.

Architecture Comparison

As you will learn from the syntax and language comparison and the end of this paper, PHP and ASP.NET are relatively similar with analogous functionality and syntax. PHP, however, is very different from ASP.NET at a lower architectural level. PHP is based on a platform-independent processor/engine that parses PHP scripts and provides for database connections, Internet protocol compliance, and numerous other tasks common to most Web application platforms.

ASP.NET is a framework built upon a series of technologies such as the CLR and offers an extensive series of well-organized class libraries that provide for most every conceivable set of functionality that would be used in a Web application. It also allows for the easy and simple creation of components to extend the framework.

While PHP offers similar things, such as the PEAR libraries, PHP and ASP.NET are not truly analogous because the ASP.NET framework is built from the ground up on an OOP paradigm and OOP concepts; PHP is not. This difference is most apparent in the ways you access classes and objects in PHP and ASP.NET.

Object-Oriented Programming in PHP and ASP.NET

Both PHP and ASP.NET offer OOP paradigms to application development, but their support for various OOP concepts, such as encapsulation and polymorphism differ. For example, PHP only supports partial encapsulation (such as support for declaring methods and fields in the class) and partial polymorphism (no overloading, no abstraction). PHP also lacks support for such concepts and accessibility in that there is no concept of private, public, or protected functions in classes as well as the Overloading. While OOP purists may debate that ASP.NET and the various languages do not fully support every concept in the OOP paradigm, this is true of most languages considered OOP, such as C++ and Java.

This has both an upside and a downside. The downside is that for some Web developers there is a steeper learning curve for ASP.NET versus PHP, which offers a scripting paradigm that developers have traditionally employed for building Web sites. However, developers who have a background in OOP languages and/or Vwill find ASP.NET intuitively familiar and easy to learn.

The upside to ASP.NET's support of OOP concepts means that ASP.NET applications for the most part result in better designed code, have clear separation of content, logic, and data and thus are generally easier to support over the long term of a applications life cycle. In addition, ASP.NET's native support for enterprise technologies such as Message Queuing, Transactions (see the .NET Framework's System.EnterpriseServices classes) SNMP, and Web Services, makes it simple to develop highly scalable and robust applications.

You can find an introduction to the main areas of object-oriented programming (from a Visual Basic point of view) in Object-Oriented Programming in Visual Basic.

Compilation

PHP

When a PHP page is requested, the HTML and inline PHP script is compiled to Zend Opcodes. Opcodes are low-level binary instructions that will be used to serve the PHP page. After compilation, the Zend Engine runs the opcodes (similar to the way Java's runtime engine runs byte code), and then HTML is generated and served to the client.

There are a number of commercial products that can be used to speed up the execution of a PHP page by optimizing these opcodes. Other ways to increase performance of PHP scripts include caching the opcode and caching the generated HTML.

ASP.NET

When a request is made to IIS (Internet Information Services) or another Web server for an .aspx page (or any other extension supported by ASP.NET), the request is passed to ASP.NET for processing. If this is the first time the page has been requested, ASP.NET compiles the page to MSIL (Microsoft intermediate language). This MSIL code is then processed by the CLR (common language runtime) to machine code. Then the request is run using this compiled code. Subsequent requests are served from this same machine code assuming the page has not been modified.

It is important to note that the binary code that is generated by the CLR is already as optimized as possible; no add-on product is necessary to achieve maximum performance.

It is also important to note that everything in ASP.NET is compiled to machine code before being run. Even HTML text is converted to a string literal control and inserted in proper order into the control tree.

PHP Web developer (PHP/MYSQL) @ SAND | “Featured Job

Code: SND/ PHP 1


Job Title: PHP Web developer (PHP/MYSQL)

Employer: SAND (Software Applications Networking and Development) is a software development company providing quality projects in the fields of Telecommunications, Computer Telephony), web, GSM messaging and WAP (Wireless Application Protocol) systems.

Job Type: Full Time

Country: Cairo - Egypt

Job Description:

The ideal candidate will be responsible to start and complete projects on a scheduled basis, inclined to maintain highest standard of quality, self disciplined enough to adhere to PHP coding conventions and standards, and work with other team members located across geographies and time zones.



Qualified Candidate:

- Proficient in PHP, JavaScript, HTML and MySQL.

- Hands-on any PHP based framework/CMS like CakePHP or Drupal.

- Good to have Object Oriented Programming Skills ( PHP5 ).

- Must write efficient code with documentation.

- Can read code written by others.

- Has experience debugging code.

- Must be a team player, posses a good attitude and be self-disciplined

-LINUX experience is a Plus

- B.sc in Computer Science or Computer Engineering

- Very Good written and verbal communication skills in English.

Experience : 1 – 2 Years

Job Contact Email: hr@sandcti.com

(Please mention the Code in the email address)

Company Website: www.sandcti.com



Director of Software Development needed

Job Description:

Directs the activities of a software systems development function, software applications development function, and/or a software quality assurance function.

Duties And Responsibilities:

Hands-on, technically savvy leader, who has an equal amount of hands-on technical experience, business acumen and people management skills.

Prior budget management and staffing administration experience.

Maintain strong grasp of industry trends, cutting edge technology and marketplace changes to ensure that SPS remains in a leading position with regard to its competitors.

Solid relational database design and development skills.

Work collaboratively with global and regional teams to execute both internal and external software development projects.

Drive product development by enabling creative use of existing technology platforms and by encouraging new technologies where appropriate.

Position Requirements:

Have excellent leadership and motivational skills, with experience working in a competitive environment where intellectual rigor is the norm.

Bachelor of Science degree in computer science or an equivalent discipline.

Have demonstrated ability to recruit, motivate and retain high quality developers.

Five plus years of experience in managing fast paced, high energy development teams.

Have ten-plus years of applicable experience in developing high performance enterprise applications with a demonstrated track record of delivering releases on time with excellent quality.

Only qualified apply please.

Please send your updated C.V to mhassan@siliconexpert.com



Oracle EBS technical developers required

A reputable firm requests Oracle EBS technical developers with the following qualifications

1- Minimum 2 years experience in Oracle EBS

2- Excellent in SQL and PLSQL

3- Excellent in using Oracle reports builder and registering customizations to Oracle EBS

4- Excellent in using Oracle EBS APIs and interfaces

5- Good knowledge in the following is a plus

* Oracle forms builder

* Oracle XML publisher

* Forms personalization

* Oracle Discoverer

* Oracle Workflow

* Oracle Alerts

* Oracle OA framework

* J2EE

6- Others requirements

Fluent in English (reading - writing - speaking)

Ability to travel outside Egypt

Engineers and computer science graduates are preferred

To subscribe kindly send your CV to oracleerpjobs@yahoo.com



SQL DBA @ Abu Dhabi, United Arab Emirates

Job Description

: Experience of 5 years in Data modeling, database optimization, implementation of schemes, implementing, operating, monitoring & managing application servers, & many professional certifications in Oracle Technology.

•Installation of infrastructure new software & preparing the environment of applications.

•Configuration of hardware and software with the system administrator.

•Monitor and administer DBMS security. This involves adding and removing users, administering quotas, auditing, and checking for security problems.

•Responsible to analyze the data stored in the database and to make recommendations relating to performance and efficiency of that data storage.

•Responsible for Data modeling and optimization.

•Responsible for the administration of existing enterprise databases and the analysis, design, and creation of new databases.

.install and setup oracle server and oracle applications.

.communicate and give technical support to all branches that deal with the Databases.

.making handmade reports and writing inquiries.

.download some information from different sources.

Job Location

: Abu Dhabi, United Arab Emirates

Required Candidates

Experience : Min 5 Years

Gender  : Any

Education  : B.Sc. Computer Science

Additional requirements 
: Send your cv with photo Arabic or English and your expectation is required the min. salary where the job is based in Abu Dhabi and the salary is Full package + one return ticket for the employee only once every 12 months + Medical insurance.

it@masterhr.com

subject:

SQL DBA



PHP, ASP.NET Web Application Developers Required @ UAE

Location: UAE
Immediate full-time position available. Candidate must have at least a BSc in Computer Science or Information Technology.

Primary Requirements:

- At least 2 years experience in:

1) Web development and web and windows applications using VB.Net /C#, PHP and ASP.NET programming language and MySQL, SQL Server databases.

2) Have good working knowledge of Adobe Dreamweaver, Flash MX, Photoshop and Illustrator.

3) Project Management and attention to detail.

4) Arabic speaking candidate will be preferred.

5) Leadership oriented and Creative thinker

Send your CV (with a latest photograph) immediately to: careers@create905.com




Java/ J2EE Developer @ Dubai “Urgent”

Location : Dubai - UAE
Java/ J2 Developer, with 3 years experience, required for a company.

Email CV to rizwana.dicetek@gmail.com