Initialise External Javascript in Page Fragments

In the last couple of hours I was contemplating around maintainable, performant and non-obstrusive Javascript on a project I am working on.

Following situation:
- Much Inline Javascript
- Many JS and CSS files referenced
- No Frontend Deployment/Build Process in place
- Some Javascript values are set at page generation time by Server Side code
- Webserver is not configured yet correctly for setting expires & compression headers

Problems with this:
- Maintainability and separation of concerns is an issue with lots of inline JS
- Long Pageload because of many HTTP request
- Webserver takes big hit for all the static content loading
- Network is being stressed as well
- Javascript Logic is unobfuscated/not minimised and visible to the world

Posted in Uncategorized, javascript | Tagged | 1 Comment

JPA Best Practices and efficient research

Recently, in the course of a evaluation for a project to switch their persistence provider I was doing some JPA research and came across this exhaustive presentation from Carol McDonald: JPA Best Practices.

I am working with JPA now quite some time, but always found that the documentation is not very detailed for such an important subject. Good to find some coherent information and surprising to me that this presentation has only 1851views on Slideshare. Slideshare is actually a really good resource for  quality in-depth information on various technical subjects.

Posted in JEE, Search | Tagged , | 3 Comments

Firefox 3.5 hanging? slow? buggy?

Like many other users I recently had slow-down problems using the new firefox 3.5.x. Seems like the Skype Plugin was causing the issues. Disabling it worked for me. There is an interesting thread on the issue. Skype apparently is having problems making reasonable quality plugins for quite some time. Mozilla was aware of it but due to political reasons did not block the knowing troublesome plugin in the new version.

This feels really strange for such a company to piss off users just to please some exec’s at skype / ebay.

Posted in Distractions | Leave a comment

Long development cycles of compiled languages – the real killer

Ever asked yourself what are the reasons for the rise of scripting  languages like PHP, Ruby, Groovy for web development in the last couple of years? Let’s take the concrete case of Java. Common critiques of the language and the API’s, and the J2EE/JEE frameworks were/are in a loose historical order:

  • performance – too slow: this was quite a while ago. JVM’s are very fast nowadays
  • bloated: still true for some aspects. E.g. no closures (still..)
  • too complex & heavyweight, meaning too many dependencies to setup and take care of. Especially for J2EE this was the case. JEE changed a lot here.
Posted in Web2.0, java, programming languages | Tagged , , | 3 Comments

Scaling Enterprise Applications and all that jazz: Terracotta, GigaSpaces, and Azul

I like scaling and the architectures that attempt to solve those issues. Below I tried to bullet point 3 prominent players in this area, all solving scaling problems with different architectures at different levels.

  • Terracotta 3.1
    • Clustering JVM using Network attached Memory
    • Only the field-level changes are sent over the network
    • Uses TCP to communicate within cluster
    • Open Source and recently acquired EHCache
  • GigaSpaces
    • Cloud enabled Middleware Platform (PaaS)
    • Space Based Architecture” – inspired by JavaSpaces
    • Partitioning & Co-location as essence: Ulitmate goal: “share nothing architecture” – eliminate costs of copying
Posted in Scalability, Terracotta | Tagged , , , , , | 3 Comments

Discovered Quercus

Scalability, security, pooling, long lived connections , container services in general are all aspects where Java has a lot to offer. PHP on the other side is good for fast development cycles with a low maintenance infrastructure, request response orientend with not so much support for long lived connections, caching etc.

Posted in Scalability, java, php | Tagged , , | 2 Comments

Copyright reloaded

I found this article recently. Quite funny the copyright symbol designer sues e.g. RIAA for using his artwork whereas RIAA itself sees itself something like the holy grail of copyright.

Posted in Distractions | Tagged | Leave a comment

FB Series: AJAX & Facebook debugging

The php facebook client has a nice setting to track the different http calls between your app and facebook. You can enable this with:

$GLOBALS['facebook_config']['debug'] = true;

This will actually insert some script code to the header of every page served, in order to render the tracking code, if there is something to render:

Posted in debugging, facebook | Tagged , | 2 Comments

Internet-scale Java Web Applications

I am currently working on 2 application architectures. One is a PHP Facebook app (IFrame) with Postgresql in the backend, the other is a Glassfish/Jersey/Toplink/PostgreSql stack.

When reading the glowing web 2.0 tech stories in the news and sites like highscalability it seems like just about everyone requiring a “internet-scale” architecture is using MySQL, many are using stacks in the line of {Phyton,Django|PHP, Zend}{memcached/MySQL} and take advantage of the new offerings of Amazon or Google to push their infrastructure to the cloud ( Microsoft Azure is another big one, Sun has something cooking, and there are many smaller cloud service providers).

Posted in EC2, Scalability, Terracotta, Web2.0 | Tagged , , , , | Comments closed

FB Series: Integrating JS


Where are we coming from

Javascript one of the most popular language for web programming. Although it has been around for decades, – coming from Netscape 1995 – it was not until the advent of the Ajax and Web 2.0 when JavaScript came to the spotlight and brought more professional programming attention.

The OpenSource movement of JavaScript frameworks started in 2005 with prototype and script.aculo.us. Since then programming appealing JavaScript based Websites has become so much easier. Nowadays its litteraly possible to mash-up widgets with little to no JavaScript knowledge and set up a stunning page. I would however still recommend for someone not knowing JavaScript first to get the basics and maybe have some JS Reference & DOM Reference handy.

Posted in facebook, javascript | Tagged , | Comments closed