Thursday, January 21, 2010

HOWTO : ArgoUML and archgenxml

ArgoUML and archgenxml are great utilities to have around while doing Plone development. However if you go by the documentation (Whatever little exists), be prepared for a long night and a pot of hot coffee handy. I hope to maintain this page with issues I encountered (and solutions wherever found.)

Problem:

File “Plone/Python-2.4/lib/python2.4/site-packages/xmiparser-1.4-py2.4.egg/xmiparser/xmiparser.py”, line 697, in calcDatatype
raise ValueError, ‘datatype %s not defined’ % typeid
ValueError: datatype archgenxml_profile.xmi#16a8d020-4c0a-58ce-993f-e6306abf0bbf not defined

Solution:

Save your project as “.zargo” file format and pass that to archgenxml instead – like “archgenxml test.zargo”.

Comment: You’d have expected that whoever thought of something like archgenxml would have enough sense to print out a warning – seems like an obvious trap to fall into (going by the documentation).

Problem: You want to override the default view of a custom content type. That is “content_type/view” should resolve to your defined view.

Solution:

Setting up things in argouml to override the view is simple -

1. Select the class you want to set the default view. It is important that you click on the class name – selecting any other attribute or method will NOT work.

2. Click on the “Tagged Values” tab.

3. Select the default_view tag from the list of drop downs. Set the value of the tag to resolve to your defined view.

4. Save project and run archgenxml to setup the Plone product.

Comment: In case you cannot get this to work, just follow these simple steps to ensure that you haven’t been victimized by one of argouml’s quirks.

Step1. Open up the profiles/default/types/your_content_type.xml

Step2. Search for the line which contains the following declaration

your_default_view

it should be set to your default view. If not, you need to go back to step 1 of the solution above and really ensure you click on the class name and start over again.

Next we will see how to actually provide the view.

For more details about Web development in Plone please visit – http://www.bygsoft.com/webservices

Wednesday, December 2, 2009

Plone fone

Someone might say that this blog is more about CMS in general than Plone specifically. I will still prefer being in the context of Plone. I have started liking Plone too much. Simply it has taken away lots of pain from my day to day website development.

Do you want to build a simple website which has only static data content? Tring tring, “May Plone help you?” Pick up Plone and create your pages be done with it in a few minutes time. Do you want to give a different look n feel than Plone’s default? Tring tring, “May Plone help you?” Write your own css and import it in your own page templates.

It is as simple as what I have described. Literally you don’t have to sweat yourself out to build your web applications.

Once the website is ready, you can host it using Plone directly or host your website behind an internet server like apache etc. Integrating Plone based web based application with apache is a straight forward two minute procedure too.

Do you have to develop more sophisticated web application than a website? Tring tring, “May Plone help you?” Don’t Stop calling Plone because it helps. So keep calling. Plone is based on object oriented technologies Python and backend database server ZODB. Both of these technologies are best object oriented technologies. And Plone seems to be making really good use of object oriented concepts. Why am I talking all this? We wanted to something more sophisticated, right? Do it now. Plone has many pre-built components which can be reused in your web application.

Stick to object oriented concepts you will benefit a lot. Inherit the objects (don’t take objects literally, read more about Plone you will know what I mean.) already developed in Plone and it will make life easier for you. You will hardly be required to write objects on your own since the community is contributing to Plone base so much that there are most of the required objects available already. Your job is restricted to just integrating the pieces together to give it your web applications name.

Enough talking now, go back and seriously try it once. You will like it too. I will try to cover at least one of the things mentioned above with an example (implementation how to) in one of blogs to follow.

Continue..........

Read More at http://www.bygsoft.com/webservices

Friday, October 30, 2009

Google App Engine and Amazon S3 combo pack:

Google app engine provides you a ready to use environment to build and host web applications. The hosting environment is secured and made highly available by the google’s cloud computing infrastructure.

While google app engine provides you such a strong platform to build and host web applications, it has it’s own limitations as well. Google’s infrastructure gives you abundant computing power but not this Is not the case with storage which you would expect if you are developing web applications which require a large amount of secondary storage as well, for that even the applications requiring moderate amount of secondary storage to store the files.

Coming to the actual point, GAE has a limitation of allowing applications to store not more than 10MB of a single large file on it’s server. This may not be a problem for some of the web applications. This is a serious issue for many web applications which assume sufficiently large underlying storage, given these days secondary storage is available in abundance at cheap rates. Some of the developers and users are shying away from using GAE as a platform for their web application development and hosting only because of this reason. And to make life hard google does not have a paid service either to work around this issue.

What are these web application developers supposed to do? Switch to something else which offers sufficient storage along with computing power. The other better options available are Amazon EC2 and VPS. Give me a break. Why do we want to run away from the problem? Well, look around. Amazing Amazon is there to help you out. We need to think creatively and be selective when making decisions about technology these days. There are a bunch of technologies lying around. It is just a matter of selecting and integrating the two technologies and using them to satisfy needs. I am not trying to promote any specific cloud here, but to highlight the fact that GAE and Amazon S3 work really well. And it turns out to be a cost effective solution.

GAE provides the development and hosting platform for you web applications at free of cost while Amazon S3 provides you reliable, powerful and abundant storage at cheaper rates. GAE and Amazon S3 together can do wonders.

Enough of theory, let me explain it to you with a practical example.

We, at BYGSoft, had a requirement to develop a web application for one of our client. It was a simple web application which will work as a download portal for it’s customers. We chose GAE as a development and hosting platform for web application and Amazon S3 as the back end storage.

Read More - http://www.bygsoft.com