Wednesday, May 30, 2007

SugarCRM with Seagull, Chapter 2

Made local installation of SugarCRM, went almost smoothly (got some minor unimportant errors). Tried to connect to its API with PEAR`s SOAP_Client. The test call was made correctly but when I passed it multidimensional arrays as parameter (for login call) something odd happens. It always returns error. Tried with nusoap, everything went almost smoothly (the problem with it is using same name for a class as PHP 5`s SOAP extension, solution is disable extension or make renames in nusoap classes, I made the second option, as I dont know whether I will use PHP`s SOAP in future). Now I am able to communicate with SugarCRM, working on classes that will talk with it atm, more will come.

Tuesday, May 29, 2007

SugarCRM with Seagull, Chapter 1

Started today an interesting project, namely integration of SugarCRM (customer relationship management) solution with seagull. Plan to do it trough provided soap API interface, looking forward to challenges, which will surely come. Plan to make it as part of export module (maybe later a separate one), as I need only one way (SGL->Sugar) communication. If anybody has idea/proposal don`t hesitate, now is the time :)

Play nice with Zend Framework

Glad to announce that I managed to integrate Zend_Search_Lucene with Seagull framework. I used bridge pattern to close the gap to it, and have written a little IndexBuilder class that makes use of strategies to harvest search targets. Made a strategy for articles in database so they are searchable.

Was a bit concerned about performance side of the thing, just imagine that ZF uses Apache Lucene`s java based search engine & I made a wrapper around a wrapper, sound pretty silly btw :) On win box I needed quite a few seconds do generate/search even small indices. The biggest surprise came when I made it in work on linux (debian/vserver) server, its lightning fast, so slowness on win is probably a local environmental issue. The index size is really acceptable (if you design fields of documents correctly), so it scales well.

Most people use LIKE SQL queries for searches, it has serious limitations (it is enough for simple cases), example: search in multiple fields, various boost factors.

More still to come (release/wiki), if somebody needs it badly leave a message here

Tuesday, May 22, 2007

My set of development tools

I have put together this post to help readers who are thinking of what tools should they use for php/webdeveloment. I have started with notepad, continued with Macromedias Dreamweaver. So had my learning curve & would like to help you make yours steeper.
After 5 years of php/web development I am using the following tools, found them extremely useful. It is good to choose the right tool for the right job, will save you time and money. Of course everything can be done with notepad/vi but these are my favorites.

PHP IDE`s

Zend Development Environment: real productivity booster. Developed by a company that stands behind php language it has almost everything you can need for php development. Their code completition is rather good. What I miss here is better support for css, for html they have support, but for merely php programming it is great.

Eclipse
: Open source IDE, the biggest +. Interesting one for those who are working with more languages & want to put together their own flavour IDE (put in java,c++,php,uml support). It is great tool because you only need to know one IDE for all your languages. There are lot of high quality free plugins for it. Just to mention that Flex2 IDE also comes as eclipse plugin. So you wont regret using it. There is also phpeclipse plugin for you.

PHP libraries

PEAR : the ONE but not the only. It is the real php power unleashed. You get access to quality code written by few of the best php programmers out there. It can help you with almost every issue you can face in development (templating, sessions, auth backends). Just put together your favorite selection of packages and you are almost done with project. It is well supported and documented. It helps you avoid low level php programming. There are multiple sites out there that offer php classes, but most of them arent well supported/maintained/documented. Avoid usage without deeper code inspection. After a while you will be able to differentiate between good and bad coding style.

PHP Frameworks

There are quite a few out there. They help you build reusable code. Also it makes a difference that after 6 month when you completely forgot your own code, how fast will you find your way around. Have tried a few of them like Zend Framework, CakePhp, Geeklog. My framework of choose is definitely Seagull. The community is great, its a light framework where you will easily find your way after 1 month. That sacrifice is worth believe me.

Database IDE`s

DBDesigner : great tool for planing Mysql databases, you can visualize your ideas, no more papers & it can synchronize the db layout with database engine

Navicat: extremely useful for writing more complex queries, mysql5 ready, sql code completition is comming with next release, has advanced backup features, supports triggers & stored procedures, I use it for remote/local access for my databases. Its not free but worth every cent of the price.

Versioning software

TortoiseSVN : I am using it all the time, even in projects when I work alone, no more lost files, untracked modifications. It has updatehooks, so the live deployment of the code could be done with a bit more advanced setup as well. If you need to choose between SVN and CVS , always go with first..


Hope that somebody will find this recommendations useful, and I am interested in your used environments as well!

cheers

Monday, May 21, 2007

KML export for Google Maps with Seagull

I have spent a little time with sitemap export for Seagull, and this is just a variation on same theme.
Have made a manager & few library extensions for Seagull, that makes an export to KML xml format defined by google. Find out more about it here.
In few words it defines a layer in xml format that can be displayed on Google Maps, you can display it on your own site.
Advantages of using it are:
  • it can drive you traffic from Google Maps searches,
  • geotargets your content as well because it supports html (you can make geotargeted news engine from it). The library supports deploying your own strategies so customization/extendibility wont be a problem.
  • it is discovered/indexed/searched by Google, imagine it another type of sitemap.
  • it is better solution for filtering geotargeted content than implemented in googlemaps module of seagull
  • provided access to Google`s geocoder service (the current implementation in googlemaps module supports Yahoo`s geocoding service), but decided to write one for Google because of following reasons: did some testing for canada & had some problems with Yahoo (for US only they are pretty much the same), SPOF (Single Point of Failure) because smaller number of services you depend on is better. This part of code is not clean yet, thats holding back the release, but it should support geocoding subject harvesting strategies (did I mentioned that I like strategy pattern? :), then it would be suitable for production use.
The database structure remained pretty much the same as in current implementation, except that I added a text field for storing KML response from Google for future use (for this reason I needed XML_Serializer package from PEAR, to be able to interpret mentioned response).

Estimated Release date: I plan to make it soon, lets say 2 weeks, I am involved in other places at the moment, but will make a push.

I am interested about your ideas for extending it. Also would like to mention name of Steven Stremciuc who did the original googlemaps module, who has done great job.

Friday, May 11, 2007

Sitemaps with Seagull

Yesterday I had made a contribution to Segaull php framework project. Check out more about it at seagull wiki. Hope it will be accepted in base framework. It generates sitemaps for Seagull, its multilingual & easily extendible & uses caching. What is more important its working :) I am really interested in feedbacks about it.

First Post

Hi all,

My name is Laszlo Horvath, welcome to my unofficial blog. In few words, i am php programmer, living in serbia, studied in hungary.