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

42
Web Development Environments: Choose the best or go with the rest Chris Munt M/Gateway Developments Ltd

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

Page 1: 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

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

Agenda

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

• Choosing the “right” one

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

Choosing the right one

• Effect of powerful corporate interests

• Effect of powerful community interests

• Effect of peer pressure

• Effect of Open Source movement

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

Choosing the right one

“No one ever got fired for choosing __”

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

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

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

Windows?

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

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

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

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

Not Windows?

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

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

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)

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

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).

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

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

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

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

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

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 …

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

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

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

.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

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

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

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

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

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

Java/JSP: Frameworks

• Barracuda

• Apache Struts– Formerly Jakarta project

• Spring

• Many others …

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

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)

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

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

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

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)

}

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

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

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

PHP: Frameworks

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

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

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;}

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

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

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

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]

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

Python: Frameworks

• Django– Google App engine

• Pylons• TurboGears

– Combination of CherryPy and MochiKit

• CherryPy• MochiKit• Zope• Pyroxide

– Layered on mod_python

• Many others …

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

Python: Other key developments

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

IronRuby.

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

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

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

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}”}

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

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.”

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

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

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

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

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

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}";}

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

Perl: Frameworks

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

other “3 Ps”)

• Mason

• Catalyst

• Many others

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

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

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

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

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

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

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

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

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

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

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

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

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

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.