Tag Archives: plugin

Java Developers Please Help

This is the translation of a post that I have written yesterday in Portuguese (pt-BR): Programadores Java Por favor ajudem. It will tell the same story and also share the updates. Honestly I hope to find some clues by sharing this issue with the International Java Community.

I haven’t developed with Java for a long while. Last time I have coded anything in Java it was with J2ME and, if I’m not mistaken, the framework was at its version 1.

Recently I was trying to help my old man (dad) with an issue that he was having at his real estate agency. For unexplained reasons until this moment, his Bank – www.bb.com.br –  site does not work with his Windows 7 Dell machine.

To get the issue resolved I have entered in contact with it’s tech support. Their tech support is annoying as it could be, they can only be contacted through phone and if you need to really get in touch with a technician, the only way possible is by having the branch manager to call in for you.

The 1st contact it was suggested to format the computer and try all over again, as it could have a worm / virus or a corrupted Java machine. With a lot of complains we did that and after all it still did not work.

Contacting the Bank tech support again the reply were:

  • there is a virus again (as it had from the beginning)
  • the ISP (Velox) provider was blocking content making the bank site not to work properly.

The ISP is blocking content? Really? You got be F**** kidding me. I knew that it was completely bullshit.

As a PHP developer I can tell that there is an issue with the bank website and / or with it’s Java application and honestly I don’t think that Java is restricted to a operating system or browser (that would be simply ridiculous).

So I came in request some help from Java developers. Can someone please give me a reasonable / logic explanation of why the bank Java application is not working on a Dell Windows 7 Machine?

UPDATES

After I have posted this yesterday I had got a possible lead. There is a plugin that some bank java applications uses and this plugin is completely incompatible with some versions of Windows 7.  The solution so far: none.

Advertisements

Creating a CakePHP Plugin using Symbiosis

I had created a cake component for Askimet (https://github.com/mcloide/CakePHP-Askimet-Component) before and I wanted to check how easy would it be to create a plugin using the Symbiosis project (https://github.com/zumba/symbiosis).

After cloning the CakePHP project, I have cloned the Symbiosis project into the app/Vendor folder. Right now I had the 2 elements necessary to make it work.

Most of the process is done just like it is explained on the GitHub page from the Symbiosis project, but here are the caveats that can be easily fixed. The 2 big caveats are on both the bootstrap and on the Plugin class. I’m describing them bellow.

CakePHP Bootstrap

  • include the autoloader
  • use the \Zumba\Autoloader::register($namespcae, $pathToNamespace) to register your namespace class.
  • include the Zumba\Symbiosis\Log in the same way you will include the symbiosis plugin manager
  • include the Zumba\Symbiosis\Plugin\PluginManager
  • Use the Log receive function (Log::receive($message, $level, $data)) to wrap to a CakeLog – in another words, whenever the Symbiosis logs something it will save on the default CakeLog.
  • Load the Plugins

This should be all you should do for the bootstrap, and it is really 99% of the configuration job. The biggest caveat is to register your namespace class. Without it, nothing really loads and you are left in blank.
The best way to know if you have a configuration problem is to use the PluginManager::getPLuginList(); This will return all loaded plugins and your newly created plugin should be in that list, otherwise, considering that you have followed the tutorial from github, you most likely have a configuration issue.

The Askimet Class

The Class will be pretty simple and it follows the structure that is suggested on the GitHub page from Symbiosis. The method registerEvents will have every function handled as a “triggable” event, but when you call the event from, for example, your controller, the $event->trigger() will only return true or false. Is important to keep this in mind because if your plugin needs to modify and handle some sort of data, you will need to call, inside the event trigger, another function that will handle the return of the data.

In Short

In short considering the time that I took to:

  • clone CakePHP project
  • clone Symbiosis project into the Vendor folder
  • create the new plugin on the Plugin folder (re-using the methods that I had from the component with some small tweaks)
  • configuring the application to use Symbiosis

All together it took me about 1 hour to do it all and most of the time was taken because I had misconfigurations that wasn’t making my plugin to load properly, otherwise, the whole creation process wouldn’t take more than 15 minutes.


Symbiosis

I know the guys that have came with this idea and it is a damm cool tool. Check it out:

"Symbiosis is a drop-in event driven plugin architecture.

The goal is to allow anyone to create a plugin structure for their existing code base using an event oriented system. The secondary benefit of using Symbiosis is that the event structure can be used apart from the plugin structure."

It is fully open source, so check it out: https://github.com/zumba/symbiosis


Javascript LIbrary Detector

I was scooping out a blog from a friend of mine today, Smooka Blog, and I found this interesting post from a Firefox plugin for detecting Javascript libraries. It’s useful in many ways since you can learn if your project have correctly loaded the library or what library does the site that you are visiting have.

Anyway, cool post, check it out: http://www.smooka.com/blog/2009/03/26/javascript-library-detector/#more-52


%d bloggers like this: