take the sting out of web development with activepython

11
White Paper January 2009 ActivePython Take the Sting Out of Web Development with

Upload: activestate

Post on 19-May-2015

5.337 views

Category:

Technology


3 download

DESCRIPTION

The wonderful world of Web 2.0 is evident everywhere in our daily digital lives. Web development technologies like JavaScript, Ajax, Flash and Flex are dramatically improving web application design and have catapulted database-driven applications— such as social networking sites like MySpace and Bebo and enterprise web apps like Salesforce.com—into the mainstream. Just how popular are these rich interactive web applications? Facebook has 120 million active users,1 and Salesforce.com has more than a million subscribers.2

TRANSCRIPT

Page 1: Take the Sting Out of Web Development with ActivePython

White PaperJanuary 2009

ActivePython

Take the Sting Out of Web Development with

Page 2: Take the Sting Out of Web Development with ActivePython

White PaperJanuary 2009

The Changing Face of Today’s Web

The wonderful world of Web 2.0 is evident everywhere in our daily digital lives. Web development technologies like JavaScript, Ajax, Flash and Flex are dramatically improving web application design and have catapulted database-driven applications—such as social networking sites like MySpace and Bebo and enterprise web apps like Salesforce.com—into the mainstream. Just how popular are these rich interactive web applications? Facebook has 120 million active users,1 and Salesforce.com has more than a million subscribers.2

What does this mean for software developers? As the web becomes increasingly central to business success, demand for quality, high functioning web applications is skyrocketing. But big development challenges go hand-in-hand with these growing expectations. Not only do today’s web applications need to scale for thousands or even millions of users, they must flawlessly execute critical business functions, perform faster on an ever-growing number of browsers, integrate seamlessly with other technologies, and comply with various standards.

2

Take the Sting Out of Web Development with ActivePython

This 2007 illustration of new start-ups shows that Web 2.0 applications are leading the way.

Page 3: Take the Sting Out of Web Development with ActivePython

In this paper, we present the Python programming language as a solution for efficiently building web-based applications and as a strategy for avoiding development debacles that routinely hamper web projects. We highlight an instance of Python in the real-world, demonstrate Python’s technical and business benefits, and discuss how an enterprise-grade version of Python can help you to bring quality web applications to market quickly and easily while eliminating Python’s potential shortcomings.

Web Developer Stumbling Blocks

As business and end user expectations for web applications intensify, so do the hurdles programmers face when developing Web 2.0-style applications.

Cross-Browser Support Gone are the days when the majority of surfers used Internet Explorer. Today, more and more people are using Firefox, Safari, Opera or Google Chrome. Making sure web applications work consistently across all these browsers is tricky but necessary, especially when sites are executing ecommerce and other critical business functions.

Security SnafusThe new web’s open and interactive approach runs contrary to traditional IT security practices and can make applications vulnerable to security breaches. After all, how do you both enable an open, active social network or sharing app and keep hackers and spammers from infecting your community or targeting security weaknesses in technologies like Ajax—one of the building blocks that makes today’s web apps so dynamic.

Messy Code = Maintenance HeadachesMany of today’s web-based business applications don’t effectively separate data, presentation and functionality. This tends to produce redundant, messy code. Not surprisingly, maintenance becomes cumbersome and can negatively impact application functionality.

Taking the Sting Out of Web Development with ActivePython

3

Page 4: Take the Sting Out of Web Development with ActivePython

Goodbye Static Pages, Hello WidgetsThe brochure website is a dinosaur. More and more sites are being populated with individual, interactive, modular applications—how many apps did you add to your Facebook profile today? These modular apps, or widgets, can be controlled by the website owner or they can can be controlled by the website owner, added by users, or provided by third parties. While these modules personalize sites and engage users, they pose technical challenges for web developers. For instance, how do you ensure branding consistency, robust performance and the security of third-party widgets?

Mobility is the New Frontier The iPhone has changed mobility forever. We now expect to access all our favorite applications—personal and enterprise—on mobile devices. But porting web-based applications to phones and PDAs is easier said than done. Porting woes include reinventing applications for a small screen, adapting user experience for limited input and interaction capabilities, and designing for slower connection speeds.

Is Python a Web Developer’s Best Friend?

So, what can Python do to help alleviate the complexity of web development?

For starters, it has extensive support for basic Internet protocols, which provides a strong foundation for dynamic programming. Some of the core facilities that make Python a natural fit for web development include HTTP server implementations including file and CGI servers; SSL support enabling secure web sites through HTTPS; a full suite of tools for interpreting CGI requests, making it easier to write effective CGI handlers; XML support; and support for FTP, SMTP, POP, IMAP, etc. Python also provides support for lower-level network programming, like socket interface and a framework for asynchronous network communication. Python also supports RSS feed processing and a variety of other Internet protocols. This laundry list of services demonstrates that Python has the web development basics covered.

4

Taking the Sting Out of Web Development with ActivePython

Page 5: Take the Sting Out of Web Development with ActivePython

A Python PrimerPython is an especially “minimalist” language. Tim Peters is the author of “The Zen of Python.” He explains the Python paradigm this way: “Simple is better than complex. Explicit is better than implicit.” Sounds like music to a software developer’s ears, right?

First released in 1991, Python is an open source, dynamic, object-oriented programming language. In 2007, TIOBE, a company that assess and tracks software quality, declared Python the language of the year. Any software developer can use Python for free, even in commercial projects. Its primary tenets of programmer productivity and code readability3 make Python a favorite for developers and software businesses alike.

Another Python claim to fame is “playing nice” with others. In other words, it integrates well with web technologies, like Java, .COM and .NET, helping to “glue” them together. It also comes with an extensive and comprehensive standard library that covers everything from asynchronous processing to zip files. Though Python is especially suitable for web development, it is also widely used for scientific and numeric computing, network programming and game development.

Python’s popularity is palpable. There are hundreds of thousands of developers using the language, and the high-traffic Python newsgroup generates more than 200 posts per day. Like any widely used open source platform, Python improves over time, adding to the stability and scalability of any web-based software project built with it.

The technical benefits are obvious, but Python has business paybacks too. First, it’s an open source language, which means it is free for any software developer to use, as long as they follow the licensing rules and requirements. So, building Python into your project won’t cost a mint in licensing fees.

Second, Python accelerates programmer productivity and reduces the time it takes for a web application to get to market. The Python Software Foundation says most developers can learn how to program with Python “in just a few days” and many programmers report substantial productivity gains.4 Once development is complete, Python’s uncluttered code is easier to redesign, modify and maintain, saving software businesses time and money in maintenance costs. Many developers agree with TIOBE’s assessment of Python and believe the minimalist nature of the code results in better quality, more maintainable applications.

5

13 Technical Reasons to Use Python

1. Clear, readable syntax.2. Scales effortlessly to the largest projects3. Runs on most operating systems,

including some embedded and special-purpose processors.

4. Highly flexible—good for small scripting tasks or multi-tiered, enterprise-wide solutions.5. Strong introspection capabilities.6. Intuitive object orientation.7. Natural expression of procedural code.8. Full modularity, supporting hierarchical packages.9. Exception-based error handling.10. High-level dynamic data types.11. Extensive standard libraries of useful third party modules for virtually every task.12. Extensions and modules easily written in C, C++ (or Java for Jython, or .NET languages for IronPython).13. Embeddable within applications

as a scripting interface.

Taking the Sting Out of Web Development with ActivePython

Page 6: Take the Sting Out of Web Development with ActivePython

Google Chooses Python for App Engine

Python looks great in black and white, but it delivers in the real world too. This year, Google launched Google App Engine, a platform that enables developers to build web applications using Google’s infrastructure.

You might choose to build your app with Google App Engine if:• You don’t want to maintain your own servers• You want to easily share your applications with others• You need automatic scalability• You want to take advantage of the reliability, performance and security of Google’s infrastructure

Google App Engine applications are implemented using Python. In fact, Python is currently the only language supported by Google App Engine. “Python has been an important part of Google since the beginning, and remains so as the system grows and evolves,” says Peter Norvig, Director of Search Quality at Google Inc. With Python, Google ensures applications deployed on its App Engine are easy to build, easy to maintain, and easy to scale—all key advantages of using Python.

6

“Without [Python], a project the size of Star Wars: Episode II would have been very difficult to pull off. From crowd rendering to batch processing to compositing, Python binds all things together.”

Tommy BurnetteSenior Technical DirectorIndustrial Light & Magic.

Taking the Sting Out of Web Development with ActivePython

Page 7: Take the Sting Out of Web Development with ActivePython

Is Python Too Good to Be True?

We’ve painted a rosy picture, but there are some very real problems that can occur when you use an open source language, like Python, in your software development project.

• 24/7 Python support simply doesn’t exist. When you are on a tight development schedule, a lack of formal support or training can put your project at risk. The open source community will respond to your queries and questions, but they work on their own schedules and are not especially motivated to keep your software project moving smoothly.• If the open source software you’re using is not top quality, it can cause a ripple effect that disrupts your product quality and/or business processes.• Unless you have a Python expert in-house, you can spend a lot of time and money developing expertise on the language. All those productivity gains you expect to see by using Python evaporate if you spend hours, days, even weeks trying to make Python work for your project. • Open source code needs continual maintenance and updating. Watching for and implementing updates and bug fixes is time consuming and can negatively impact the quality of your software if it’s not done right.• Just because it’s open source doesn’t mean there are no strings attached. Managing open source licensing can be both an administrative headache and opens your business up to legal hassles. If you misinterpret licensing requirements, you could wind up in the middle of a legal battle. The last thing you want is to see is all that money saved on license fees redirected to lawyers’ fees.

Eliminating Risk with ActivePython

If you use Python to build your web application, there’s a good chance your app will be completed more quickly and easily, and you’ll reap the long-term benefits of high-quality, maintainable code. That is if everything goes to plan! The implementation of Python is where things can break down. Negative outcomes may be missed deadlines, skyrocketing costs and developer frustration as you desperately try to make Python work for your project. No matter how painless Python appears at the outset, if you don’t have the expertise and resources in-house to manage potential obstacles that accompany open source implementations, then your software development project is in danger.

7

Taking the Sting Out of Web Development with ActivePython

Page 8: Take the Sting Out of Web Development with ActivePython

ActiveState’s ActivePython is a no-risk, complete, ready-to-install Python distribution for Windows, Mac OS X, Linux, Solaris, AIX and HP-UX. It is widely recognized as the industry-standard Python distribution and comes packaged with core Python, popular extensions and complete documentation. The Windows version includes PyWin32, a set of extensions that provide Python bindings to much of the Windows API and to Windows COM, and the Pythonwin editor. Thousands of developers worldwide rely on ActivePython for completeness and ease-of-use.

For software developers using Python in a corporate environment, ActivePython Enterprise guarantees that you will see all the benefits of Python at work in your enterprise project. It protects companies from stalled projects, code maintenance slowdowns and licensing fiascos with a comprehensive software, support and maintenance package.

Here’s how ActivePython protects your development project from going off the rails:

Open Source Expertise at Your FingertipsAdding a Python expert to your development team can make the difference between good and great software. Rather than hire in-house, which can be expensive and perhaps even excessive, you can lean on ActivePython language experts for design and development advice. ActiveState engineers contribute to Python and maintain great relationships with the open source community. They continually and rigorously quality test the ActivePython distribution to ensure that the code boosts the overall quality of any commercial software project.

Well Maintained, Problem-Free PythonMaintaining open source code in-house can be a slippery slope towards wasted time and an out-of-date code base. Quarterly ActivePython updates ensure you’re always working with the latest and most secure release. By handing maintenance and updates over to the ActiveState Python professionals, you eliminate the work it takes to maintain a healthy open source distribution.

8

Taking the Sting Out of Web Development with ActivePython

Page 9: Take the Sting Out of Web Development with ActivePython

On-Demand Technical SupportDon’t risk having to wait days or weeks on end for the open source community to answer your queries. From development troubleshooting to emergency in-production coverage, ActivePython Enterprise ensures priority access to language experts and includes unlimited incidents, fast response times, and fixes quickly delivered to you electronically.

Cost Effective LicensingAt first glance, managing open-source licensing on your own seems the most affordable option. But open source licensing can be baffling. Once you point a developer or two at collecting and reviewing all the licenses in use and then get lawyers onboard to do due diligence, the cost of managing Python licensing in-house can add up. ActivePython OEM Licensing provides an easy, out-of-the-box, fixed licensing solution that guarantees you’ve got the right licenses in place. It takes open source licensing issues off your plate and reduces roadblocks to software delivery.

Is ActivePython Right for Your Web Development Project?

The burgeoning world of Web 2.0 has vastly improved users’ experiences on the web. But at the same time, it has introduced arduous development challenges for the people building today’s web applications. While Python can go a long way in simplifying the development of portable, scalable web apps, it’s no panacea. Adopting Python while working under time constraints with insufficient in-house resources and no safety net can be a recipe for failure. By choosing an enterprise distribution of Python, like ActivePython, you ensure top quality code, you no longer have to worry about maintenance or upgrades, and you automatically add the very best in Python expertise to your development team without having to hire a Python expert in-house.

Make sure your project realizes all the benefits of Python. Talk to an ActiveState open source expert to determine if it is the right fit for your software development project. ActiveState experts consider all the challenges your development team faces and make recommendations tailored specifically to your project. Register today for a complimentary consultation with an ActivePython specialist.

Contact [email protected] to schedule your free consultation.

9

Taking the Sting Out of Web Development with ActivePython

Page 10: Take the Sting Out of Web Development with ActivePython

ActiveState is owned by its employees and Pender Financial Group, a private merchant bank focused on technology in British Columbia.

For more information, visit www.activestate.com.

1 Facebook Press Room, http://www.facebook.com/press/info.php?statistics.

2 http://www.salesforce.com/company/news-press/press-releases/2007/12/071205-1.jsp

3 “What is Python? Executive Summary.” Python documentation. Python Foundation.

4 Python Software Foundation, www.python.org/psf/

Taking the Sting Out of Web Development with ActivePython

Page 11: Take the Sting Out of Web Development with ActivePython

9

ActiveState Software Inc.1700-409 Granville StreetVancouver, BC V6C 1T2

Phone: +1.778.786.1100Fax: +1.778.786.1133

[email protected]: +1.778.786.1101

Toll-free in North America1.866.510.2914