Web Development Environments: Choose the best or go with the rest

Post on 08-May-2015

7.806 views 2 download

Transcript of Web Development Environments: Choose the best or go with the rest

Web Development Environments: Choose the

best or go with the rest

Chris Munt

M/Gateway Developments Ltd

Agenda

• Technologies– CSP, WebLink– Dedicated: JSP, ASP.NET, PHP etc …– Pre-existing: Perl, Python, Ruby etc …

• Choosing the “right” one

Choosing the right one

• Effect of powerful corporate interests

• Effect of powerful community interests

• Effect of peer pressure

• Effect of Open Source movement

Choosing the right one

“No one ever got fired for choosing __”

Windows?

• You can evaluate and choose from…– PHP

• Zend, CakePHP, PHOCOA, Friendly, Symfony, etc…– JSP/Java

• Barracuda, Struts, Spring, etc …– Python

• Django, Pylons, TurboGears, Zope, Pyroxide, etc …– Ruby

• Ruby on Rails, Ramaze, Camping, etc …– Perl

• LAMP, Mason, Calatyst, etc …– CSP, WebLink

• Zen, EWD, WLD

Windows?

• … or go with the crowd …– ASP.NET

Not Windows?

• You can evaluate and choose from…– PHP

• Zend, CakePHP, PHOCOA, Friendly, Symfony, etc…

– Python• Django, Pylons, TurboGears, Zope, Pyroxide, etc …

– Ruby• Ruby on Rails, Ramaze, Camping, etc …

– Perl• LAMP, Mason, Calatyst, etc …

– CSP, WebLink• Zen, EWD, WLD

Not Windows?

• … or go with the crowd …– JSP/Java

Choosing a database 1980s/90s

• … Evaluate demonstrably better performing options …– Cache

• … or go with the crowd …– Oracle– DB2– Informix– Sybase– (SQL Server – partially derived from Sybase)

Choosing a database 2000s• Looking at alternatives to the big players no longer

seems daft.– Cache– Derivatives from the M and PICK world– XML Databases, OO Databases– MySQL– Btree based databases from the embedded systems world

• Previous main players?– Oracle (Oracle Database 10g Express – free).

• (purchased Berkeley DB from Sleepycat 2006 - free).– DB2 (provide DB2 Express-C - free).– SQL Server (provide SQL Server Express – free).– Sybase (A long way behind the top three).– Informix (Acquired by IBM 2001).

Databases: What happened?

• Over-powerful vendors– Challenged by Open Source movement

• MySQL• “Good enough” databases

– Challenged by diverse requirements• XML• Diverse data types• Web services• Embedded systems

Web Development: What’s happening?

• Two monsters:– ASP.NET– Java/JSP

• Vendor interests assisted by over-powerful development communities– Challenged by powerful user communities and

companies acting on their behalf• Google App engine: Python takes its place on the Cool Wall

– Ongoing challenge from Open Source movement

Web Development: How to choose an environment

• Note the impact that companies like Google can have.

• Don’t be afraid to evaluate lesser known technologies provided … well let’s look at what’s available first …

ASP & ASP.NET

• Microsoft IIS• Classic ASP (~1996)

– script based and interpretive

• ASP.NET (~2002)– Compiled, dependent on .Net framework

• Database access– ADO.Net (base class library)– ODBC data provider– Web Services

.NET Architecture – key components

• Huge class library.• Common Language Infrastructure (CLI)• Common Language Runtime (CLR)

– Microsoft’s Virtual Machine– Contributing languages expected to work with this

layer– Memory management/Garbage collection– System resource management

• E.g. threads and exceptions

– Security

ASP.NET: Key Languages

• VB.NET– Classic VB development

• C#– Similar to Java

• Higher level types than C/C++; array bounds checking etc …

– Approved as standard ECMA (ECMA-334) and ISO (ISO/IEC 23270)

• J#– Legacy environment for J++– Usage declining– Will retire with Visual Studio 2005 in 2015

Java/JSP

• Specified by Sun

• Apache Tomcat– web container or application server– Implements Java Servlet and JSP– Apache mod_jk (Jakarta) manages

communication between Apache and Tomcat

• Database access– JDBC, web services

Java/JSP: Frameworks

• Barracuda

• Apache Struts– Formerly Jakarta project

• Spring

• Many others …

Java/JSP vs. ASP.NET

• Similar technical framework:– Sun: Java Virtual Machine (JVM) + Java– Microsoft: Common Language Infratructure

(CLI) + C#

• Similar compiler architecture– Both use intermediate “Bytecode”.

• Sun: Java Bytecode• Microsoft: Common Intermediate Language (CIL)

JSP vs. ASP.NET

• Similar execution environment– Sun: Bytecode can be interpreted, compiled in

advance or Just In Time (JIT)– Microsoft: CLI can be compiled in advance or JIT

• Both extremely bloated– Huge class libraries– Continuum (often messy) between technical

implementation and design– Component version control seems to persist as a

significant problem

The rest: Applying the $Order Test

Set a("c")="record c"

Set a("b")="record b"

Set a("a")="record a"

Set key="" For {

Set key=$Order(a(key))

If key="" Quit

Write "<br>", key, " = ", a(key)

}

PHP

• PHP (Hypertext Preprocessor)• Created 1994

– By Rasmus Lerdorf – One of the ‘3 Ps’ (along with Python, Perl)

• Used for over 20 million web sites• Most popular Apache module• M-like associative arrays• Increasing OO capability• Interfaces to numerous SQL-based databases

– MySQL popular choice

PHP: Frameworks

• Zend• CakePHP• PHOCOA• Friendly• Symfony• CodeIgniter• Prado• Many others …

PHP: The $Order Test

$a = array(); # An associative array$a["c"]="record c";$a["b"]="record b";$a["a"]="record a";

asort($a);foreach($a as $key => $value) { echo "<br>",$key," = ",$value;}

Python

• Created 1991– By Guido van Rossum (Hired by Google late 2005)

• General purpose scripting environment– Some implementations include compiler

• Multi-paradigm programming environment– Functional– Object Oriented

• Large standard library– Modules for processing web requests– Modules for database access

Python: The $Order Test

a = {} # A dictionarya["c"]="record c"a["b"]="record b"a["a"]="record a"

keys = a.keys()keys.sort()for n, key in enumerate(keys): print "<br>", key, " = ", a[key]

Python: Frameworks

• Django– Google App engine

• Pylons• TurboGears

– Combination of CherryPy and MochiKit

• CherryPy• MochiKit• Zope• Pyroxide

– Layered on mod_python

• Many others …

Python: Other key developments

• IronPython– Created 2006– Python implementation targetting .NET– Written entirely in C#– Similar initiatives include IronLisp and

IronRuby.

Ruby

• Created mid 1990s– By Yukihiro "Matz" Matsumoto

• General purpose• Multi-paradigm programming environment

– Functional– Object Oriented (Many ideas from Perl and Smalltalk)

• Ruby On Rails: Created 2004– Complete web application development framework– Consists of several packages

• ActiveRecord – Object Relational mapping

Ruby: The $Order Test

a = {} # A hasha["c"]="record c"a["b"]="record b"a["a"]="record a"

a.each { |key, value| puts “<br>#{key} = #{value}”}

Ruby on Rails

“Ruby on Rails is an open source web framework that's optimized for

programmer happiness and sustainable productivity. It lets you write beautiful

code by favoring convention over configuration.”

Ruby: Frameworks and other developments

• JRuby– Java implementation of Ruby interpreter

• IronRuby– Ruby for .NET.

• Implemented on Dynamic Runtime Library (DLR) layered over Common Language Runtime (CLR)

• Ramaze– Lightweight option

• Camping

Perl

• Created 1987– By Larry Wall

• General purpose scripting language

• Emphasis on text processing– Suited to the needs of web programming

• DBI (Database Interface) modules

Perl: The $Order Test

## Set up associative array$a{"c"}="record c";$a{"b"}="record b";$a{"a"}="record a";

foreach $key (sort keys %a) { print "<br>$key = $a{$key}";}

Perl: Frameworks

• LAMP “solution stack”– Linux, Apache, MySQL, Perl (or one of the

other “3 Ps”)

• Mason

• Catalyst

• Many others

CSP & WebLink

• WebLink (1996) succeeded by CSP (~2000)• Implemented over CGI and Web Server APIs• Proxy to Caché

– Responses generated entirely in Caché

• WebLink– M based. Support for legacy M systems

• CSP– Close coupling with Caché Objects and Development

environment

CSP & WebLink: Particular highlights

• Support for state-aware sessions– Migration of legacy M/Caché code to the web – CSP equivalent: Preserve mode 1

• WebLink Event Broker (1998)– Early incarnation of AJAX-like techniques

• A “first” for InterSystems

– In-form scriptable communication with server• Initially Java applet based; then XMLHTTP

– CSP equivalent: Hyperevents

CSP & WebLink: Development Frameworks

• WebLink Developer (WLD)– Code generator for WebLink applications– Run-time environment to support applications and

security.– Precursor to Zen and EWD

• CSP Zen– Developer focused environment

• Enterprise Web Developer (EWD)– Designer focused environment– Reaches out to legacy WebLink/WLD applications

WebLink/CSP vs. The rest

• Non CSP/WebLink environments– Requests processed and responses

generated on web server host– Possible multiple round trips to database– Will need to increase capacity of web server

tier sooner• Load-Balancing techniques

WebLink/CSP vs. The rest

• CSP/WebLink– Web server extension as intelligent proxy/router– Requests and complete response generated in Caché– Single round trip to database per request/response

cycle– Integrated scripting environment and database ideal

for web application run-time environment– Better performance/throughput per web server

MGWSI Gateway: Connecting all environments to Cache

• Uniform/Normalized interface to Caché• Underpins Enterprise Web Developer (EWD)• Currently supported:

– PHP (m_php)– JSP (m_jsp)– ASP.NET (m_aspx)

• To be released shortly:– Ruby (m_ruby)– Python (m_python)

• Future support anticipated:– Perl (m_perl)

• www.mgateway.com

Conclusion

• Note developments in service providers

• Keep eye on trends in all web development technologies.

• Don’t be afraid to evaluate lesser known technologies provided … there is a vibrant community supporting them.