Re: [Zope] Zope Digest, Vol 91, Issue 2

2011-12-06 Thread John Schinnerer

Aloha,

On 12/05/2011 05:30 PM, Sareesh Sudhakaran wrote:

I have downloaded Python and PHP and have used both with Komodo Edit
IDE, side by side, and have realized I would ideally want to program in
Python. But I'm okay with PHP also - which means my choice of
programming language depends on my choice of DB. Also, PHP has OOP
'capabilities' whatever that means - so maybe I can still use it like
Python to a certain extent.


Google

is php object oriented

and you'll get plenty of somewhat relevant hits. In terms of true OO 
languages (like python, ruby, java...), this may be a most relevant link:


http://michaelkimsal.com/blog/php-is-not-object-oriented/

And, what he is pointing out may not be a problem for you, if mostly 
procedural with some object capabilities is suitable for your needs.


If you are using python to build a zope product, the ZODB is used 
automagically, you don't have to do anything special. To access MySQL 
DBs you have to add an appropriate zope product to handle queries. A 
search on


zope with mysql

...or vice versa returns mostly IMO embarrassingly old hits, many from 
old.zope.org and five to ten years old. So either the old info is still 
valid, or there is a lack of current information on using zope with 
mysql (though it is said that it is easy - where are non-stale 
howtos/tutorials for those who don't already know how?).



Can you point me to a resource for Python and mySQL? I've bought 'Dive
into Python' but it has no reference on how to use it with mySQL. If my
current hosting provider supports Python and mySQL, can I make it work?
They won't let me install anything on the server side though, so I can't
use any modules that aren't there already.


Look for info/howtos on Python's DB-API and the MySQLdb module.
For example:

http://pypi.python.org/pypi/MySQL-python/
http://sourceforge.net/projects/mysql-python/
http://zetcode.com/databases/mysqlpythontutorial/
http://www.devshed.com/c/a/Python/MySQL-Connectivity-With-Python/

...though sounds like you can't add such modules on your current 
provider's server if not there already.
Myself for a project of this complexity I would want much more control 
of my server options than it sounds like you have. A low-cost VPS (I use 
linode.com), or simply use localhost until I have my options sorted out.


regards,
John S.



--
John Schinnerer - M.A., Whole Systems Design

- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
j...@eco-living.net
http://eco-living.net
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope Digest, Vol 91, Issue 2

2011-12-05 Thread Fernando Martins

On 12/05/2011 03:12 PM, Sareesh Sudhakaran wrote:


Hi John and Fernando
Intuitively I feel that my project fits in with an Object DB, which is 
why I have spent a lot of time trying to understand its methodology. 
But now I'm more confused than ever.



Sareesh, could you be more specific about what confuses you? You have 
several routes, you need to give proper consideration to those routes.


Maybe it would also help us if you clarify what is your skillset and 
experience in software development.


Also, is your problem a CIM one? see 
http://en.wikipedia.org/wiki/Computer-integrated_manufacturing and 
specifically the key challenge listed over there. I have the impression 
you might be underestimating the problem.


Finally, do you already have information about the tools in some 
electronic format? And what about the rules to choose tools? Is there 
already some computer based solution to help with the current problem?


Please keep in mind that OOP and Object DB is not the same thing. You 
can work with objects in Python and never rely on OODB.


I have serious doubts about using ZODB at your stage because AFAIK, 
creating custom objects requires the development of zope Products. Note 
that the zope book does not teach you about creating custom objects in 
the ZODB. You need another whole book for that.


And the combination RDB and ZODB suggested by Neils/John seems too 
complicated as a start. I think you have a high learning curve ahead of 
you if have to learn to create Zope Packages to put objects in ZODB. But 
maybe there are simpler ways that I am not aware of. I'm sure OOP in 
Python and RDB is a good option. ZODB itself, I'm not so sure. Maybe 
others can enlighten you better here.


It appears to me you don't have much experience and it looks like there 
is a long evolutionary project ahead of you. For these reasons, I would 
highly recommend Python. BTW, I never recommended and I do not recommend 
C/C++ for your needs, I just mentioned that I used it for a similar 
purpose many years ago.


I would recommend you to do some programming in Python just to read some 
tool data from a text file, create some objects and try to do some tool 
selection where the output is merely done with print.


Then you can upgrade to use MySQL to store your tool data and then you 
can decide if you go the Zope or the PHP route. Keep in mind that RDBs 
are a huge standard with many people and tools around it, whereas ZODB 
is very much a small niche in comparison. That should also weigh in your 
criteria.


Regards,
Fernando

___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope Digest, Vol 91, Issue 2

2011-12-05 Thread Sareesh Sudhakaran
 is to truly succeed, it must reach the capability 
to marry disjointed tools into seamless workflows. If I want to cook a recipe, 
the app should be able to tell me which ingredients to use, which manufacturers 
to buy from, the quantity and proportion, how to slice and dice, which way to 
cook it...etc. The app is an expert system. The end user is a layman who needs 
to find the best workflow without having to think about it.
I feel like the layman who needs my own expert system! So:
Do I need ZODB or am I going to be okay with mySQL? My confusion is restricted 
to Object DB vs RDB vs RDB+ORM. Among all the aspects of the project, this is 
the most boring and laborious to me, and I want to get it right the first time. 
I am confident I can make the logic work (the fun part), but I don't know how 
to manage the data (the boring part). 
Actually I like your suggestion, and I will code my project in PHP (or Python 
if I can find a way to use it with mySQL) using text files. I will use mySQL to 
start adding the data for the prototype. Hopefully things will work out!
sareesh


Date: Tue, 6 Dec 2011 00:14:25 +0100
From: ferna...@cmartins.nl
To: ays...@hotmail.com
CC: zope@zope.org
Subject: Re: [Zope] Zope Digest, Vol 91, Issue 2



  



  
  
On 12/05/2011 03:12 PM, Sareesh Sudhakaran wrote:

  
  


Hi John and Fernando
Intuitively I feel that my project fits in with an Object
  DB, which is why I have spent a lot of time trying to
  understand its methodology. But now I'm more confused than
  ever.





  

Sareesh, could you be more specific about what confuses you? You
have several routes, you need to give proper consideration to those
routes. 



Maybe it would also help us if you clarify what is your skillset and
experience in software development. 



Also, is your problem a CIM one? see
http://en.wikipedia.org/wiki/Computer-integrated_manufacturing and
specifically the key challenge listed over there. I have the
impression you might be underestimating the problem. 



Finally, do you already have information about the tools in some
electronic format? And what about the rules to choose tools? Is
there already some computer based solution to help with the current
problem?



Please keep in mind that OOP and Object DB is not the same thing.
You can work with objects in Python and never rely on OODB.



I have serious doubts about using ZODB at your stage because AFAIK,
creating custom objects requires the development of zope Products.
Note that the zope book does not teach you about creating custom
objects in the ZODB. You need another whole book for that. 



And the combination RDB and ZODB suggested by Neils/John seems too
complicated as a start. I think you have a high learning curve ahead
of you if have to learn to create Zope Packages to put objects in
ZODB. But maybe there are simpler ways that I am not aware of. I'm
sure OOP in Python and RDB is a good option. ZODB itself, I'm not so
sure. Maybe others can enlighten you better here.



It appears to me you don't have much experience and it looks like
there is a long evolutionary project ahead of you. For these
reasons, I would highly recommend Python. BTW, I never recommended
and I do not recommend C/C++ for your needs, I just mentioned that I
used it for a similar purpose many years ago.



I would recommend you to do some programming in Python just to read
some tool data from a text file, create some objects and try to do
some tool selection where the output is merely done with print. 



Then you can upgrade to use MySQL to store your tool data and then
you can decide if you go the Zope or the PHP route. Keep in mind
that RDBs are a huge standard with many people and tools around it,
whereas ZODB is very much a small niche in comparison. That should
also weigh in your criteria.



Regards,

Fernando


  ___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )