Tagged: ajax Toggle Comment Threads | Keyboard Shortcuts

  • Joe 13:43 on February 14, 2008 Permalink
    Tags: ajax   

    Cakephp: isAjax weirdness 

    Cakephp 1.2Currently, I’m doing a project in CakePHP.

    There’s lots to say about cake, here just a quick note, for myself or for anyone in case you are running into the same problem.

    Situation: you are using the Ajax helper, which contains a method isAjax() – returns true if the request was an Ajax request.

    Typically, you use this method inside a view, to conditionally render content for regular/ajax views. Example:

    if (! $ajax->isAjax()) {
    // render general page stuff
    // render stuff for both regular- and ajax view

    My problem was that the isAjax() call never returned true, regardless of ajax/regular request method.

    The solution appears to be really simple: you should include the 'RequestHandler' component in your controller class. This one took me way too long to figure out!

    public $components = array (

    Update my situation was even worse than described above; I use a redirect between controllers within an Ajax call, something which is officially supported by Cake 1.2. This worked just fine in Safari, but not in Firefox (and Opera) – these browsers would not load the Ajax view but rather the complete page, almost crashing the server by consuming huge amounts of memory.

    Read on… (More …)

  • Joe 15:13 on August 20, 2007 Permalink
    Tags: ajax, fashionable web, Peter Laird, web builder   

    Greasemonkey, for the intranet! 

    Greasemonkey IconEver since I started using Greasemonkey (GM), I found more and more ways to improve aspects of public websites. What’s more, GM also proved to be invaluable for quick testing of mashups and other fashionable web 2.0 tricks.Using GM this way, it can be used as a tool for rapid prototyping of advanced user interfaces and Ajax enhancements as well. So a web builder could write a quick and dirty user script in order to prove the viability of a concept.That would be the natural border for user scripts within the corporate world, as far as I could imagine.Wrong! Peter Laird, Managing Architect for the WebLogic Portal engineering team at BEA, wrote a 5-part blog series about deploying Greasemonkey user scripts in the corporate environment.

    1. More Mashups: Using Greasemonkey to Weave New Features into Web Sites
    2. Building a Greasemonkey Mashup Tutorial
    3. Greasemonkey in the Enterprise: When is GM the Right Tool for IT?
    4. Beware of Greasemonkey’s Inverted Security Model
    5. Solving the Greasemonkey Script Versioning Problem

    The first two articles are a very nice and moderate technical introduction to Greasemonkey. The next installment starts to position GM as a valuable corporate intranet addition, with a checklist to find out if it is the right tool for your situation. The last two articles focus on the important security- and deployment issues, focused on the corporate situation again.I’m really curious whether corporate IT department heads will really be convinced by these articles. The checklist (part 3) lists a number of very frequent corporate / intranet annoyances where GM will help and the author’s background (BEA) is very trustworthy, so I give it a good chance.Definitely worth a read, even if you’re not a corporate IT head!


    • Peter Laird 18:51 on August 20, 2007 Permalink

      Thanks for the mention Johannes. I am also curious – the third blog entry lists at the bottom both proponents and detractors of GM in the enterprise. People are doing it, but the security and deployment issues cannot be ignored. BEA (my employer) focuses on server side solutions where we don’t have these issues.

      In the enterprise portal space, which is my focus, our customers are looking to integrate legacy web applications and packaged apps into a standardized and centralized infrastructure. They are looking to reduce costs by combating the sprawl of having thousands of web applications in their enterprise. Portals are a good solution to this problem.

      But to implement a portal solution, those legacy web applications must be integrated. There are a variety of approaches, including programmatic integration using Web Services, web clipping, WSRP, iframes, etc.

      I am interested in Greasemonkey because it is yet another tool to add to the bag of tricks when repurposing web applications. It likely wouldn’t be used in conjunction with an enterprise portal, but it is interesting all the same.


  • Joe 11:02 on April 4, 2007 Permalink
    Tags: ajax, Christian Heilmann, corporate software/intranet stuff, , semanic web, web techniques, , XSLT   

    Reasons for stripping down 

    Christian Heilmann won’t go naked tomorrow.

    His reasons not to do so are:

    • Most CSS naked sites are generated from templates, so what is the individual blog author’s effort?
    • The target audience is missed, it is merely preaching for already converted style purists
    • The target market is missed: those really crappy intranets within big corporations

    My reasons for still participating with my (slightly modified) WordPress blog…

    You definitely have a point with the generated code/templates based blogs. Last year, I adapted my site layout to have the content first and navigation and boilerplate stuff to the bottom in the HTML stream. That was fun and even sped up the apparent rendering of my site with CSS enabled. So I did learn something usefull in the process as well.

    That site structure is generated from templates as well, but all handcrafted XML/XSLT stuff (in Firefox, select the alternate style CSS Naked Day to see how it works).

    Now I’m using WordPress and, indeed, just installed a plugin for ‘Naked Day. OK, so my contribution was to adapt that plugin for WP 2.1.x.

    About the corporate software/intranet stuff: you are completely right. But here I feel that bottom-up advocacy does work in the longer term. In my former (large) organisation, I got quite a few corporate J2EE developers interested in standards compliant CSS web techniques, especially after they had a very bad time trying to meet the requirements from our User Interaction specialists. The advance of Ajax does the rest.

    In just another 5 years or so, even those big vendors might have “got it” (and then go wondering what that “semanic web” stuff is all about ;-))

  • Joe 15:57 on April 2, 2007 Permalink
    Tags: 200 OK;, ajax, , Baltimore, community vigilance tools, Danny Ayers, Denny Vrandecic, Frank Zappa, front end web application, Green Genes, Hot Rats;, Maryland, Peaches;, , semantic web terminology, web applications   

    Freebase: Life, the Universe, and Everything 

    Just after my post Freebase as productive playground, I recieved an invite (thanks a lot, Ken!) and I have played around a little…

    Now, a lot of relevant things have been said around the ‘net (see my prevous post). And, there have been some in-depth reviews of the model of Freebase, related to the Semantic Web: Denny Vrandecic, Danny Ayers.

    I will not repeat these comments here, rathter give my first impressions as a curious explorer.

    First of all, the Freebase website is very heavy on Ajax, which seems to be almost essential for the functionality provided.
    As a novice user, you are launched at the “User Profile” page. While starting to fill out some profile fields, you are immediately confronted with the Metaweb Object Model (login needed).

    The Freebase Object Model

    The model roughly consists of:

    • Domain (the top level ontology, e.g. ‘music‘ or ‘business‘)
    • Type (a class within a domain, e.g. music/artist)
    • Topic (an individual object, let’s say Frank Zappa as musical artist)
    • Property (attributes, e.g. ‘name’ or ‘date of birth’, or a relation with another Topic)

    So when you start editing your User Profile, you are actually filling out a template of a User Type. Within this type, the attribute “Me as a Freebase Topic” links to an object of class (Type) ‘people/person‘. The distinction is somewhat like the difference between a real world (verifyable) person, and personas this person might use. From the Freebase documentation:

    A person topic is distinct from a user in Metaweb. Users have profiles that can only be edited by the users themselves. A person topic can be edited by anyone and is intended as a factual representation of details about a person.

    A couple of primitive Types exist (e.g. type/intor type/text), but in most cases more complex types are used for attributes. So Place of Birth is not just a text sctring, but an object of type ‘location/location‘. This ensures that all occurrences of ‘Baltimore, Maryland‘ refer to the same object.

    Following the link to this location, you can zoom in further and find that the object is not only of type ‘location/location‘, but also ‘location/citytown‘ and ‘location/us_county‘.

    Queries and results

    Freebase is called a database for a reason: you can run queries against it and get results back. Now being heavily rooted in the semantic web terminology, you might expect to use SPARQL as a query language, and results back in some RDF representation. But this is not the case.

    Both queries and results are expressed in plain JSON, which is becoming the data transport protocol of choice for most Ajax projects and frameworks.
    (More …)

  • Joe 23:18 on October 17, 2006 Permalink
    Tags: ajax, Java, JSON stream,   

    PHP, Reflection and JSON: stream your objects 

    Amongst all the improvements in PHP 5 is the concept of Reflection. If you’re a Java person, you will be familiar with this concept.

    In just a few words, Reflection means that Objects are open to (self-) inspection, so that you can interrogate an object for all kinds of properties at runtime.

    Now if you have classes with getter (and setter) methods, there are some very elegant techniques with reflection. Normally, these getters and setters are used to give access to the data contained in the object. Good Object Oriented practice makes use of these Data Objects to build a clean boundary between the data and implementation details.

    So, let’s assume that you have painfully crafted a class definition with accessors and you want to serialize the contained data as JSON over the wire. Of course, you can write a getJsonString() method for every class. But Reflection gives you a much nicer option.

    An example of serialization into JSON, entirely based on Reflection:
    (More …)

  • Joe 17:21 on August 29, 2006 Permalink
    Tags: ajax   

    Binary Ajax: EXIF Thumbnail Fetcher 

    Just a quick note: my first Binary Ajax project is ready for release (well, testing I mean).

    EXIF Thumbnail Fetcher is a Greasemonkey user script, which lets you retrieve the embedded thumbnail of a digital camera image over the ‘net, without downloading more than strictly needed.

    See my previous post for some more details. And, please test it and let me know your experiences!

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc

Twitter links powered by Tweet This v1.8.3, a WordPress plugin for Twitter.