About Pyjamas

I’ll start with a sentence about myself. My undergrad degree is in Computer Engineering from Syracuse University. I then got a master’s in Systems Engineering from Cornell. I started off as a C++ developer, but after seeing Python I immediately fell in love. So you can imagine how excited I was when I found out that I could write JavaScript (JS) web apps directly in Python using Pyjamas. I won’t bore you with the rest of my background, the blog is about Pyjamas, so I’ll keep it that way.

For those unfamiliar with Pyjamas, the quickest way to describe it is as a Python port of GWT. It allows you to manipulate HTML, CSS, and JS directly through Python, without writing a line of JS. Pyjamas then “compiles” the code in cross-browser JS. Unlike GWT, which is fairly stable and known by now, Pyjamas is still bleeding-edge, and has quite a few issues to address before mainstream adoption. Even now, however, Pyjamas offers several advantages over GWT:

  • Python is easier to code in than Java (shorter development time)
  • Pyjamas can run as a stand-alone application outside the browser in pure Python using Pyjamas-Desktop, GWT’s hosted mode on the other hand is only suitable for debugging
  • Python is more similar to JS than Java is (dynammic typing, etc.) and therefore it’s already more compatible with JS, before you even write any code. If you want proof, just compare the source code. Pyjamas accomplishes similar functionality in several thousand lines of code that GWT needs hundreds of thounsands lines for.

Yes, GWT is definitely ahead right now, but Pyjamas has higher velocity. Pyjamas is a community effort, employing “if you need a feature, add it yourself” methodology. While I appreciate the flexibility, I think this is the kind of approach that was hurting Linux until the user-friendly distributions like Ubuntu came along, and is likely to drive away beginners before they have a chance to understand what Pyjamas is. It’s hard to employ different methodology in a small project with no funding (although I do wish working proprietary functions like google groups wouldn’t be replaced with buggy non-fully tested Pyjamas-based ones). So I urge you to stick through the learning curve, it’s definitely worth it.

At this point I should probably give a quick tour by showing you a “Hello World” app, but I think a link to already written Pyjamas examples would be a lot more convincing.

This entry was posted in Frameworks by Alexander Tsepkov. Bookmark the permalink.

About Alexander Tsepkov

Founder and CEO of Pyjeon. He started out with C++, but switched to Python as his main programming language due to its clean syntax and productivity. He often uses other languages for his work as well, such as JavaScript, Perl, and RapydScript. His posts tend to cover user experience, design considerations, languages, web development, Linux environment, as well as challenges of running a start-up.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>