>Ceteris paribus there is no better replacement to a vfp piece of code than a python one. I had a wonderful experience replacing a foxisapi-based servlet with a modpython one. That was a real joy to code. However life ain't always as simple. The truth is that quite a number of VFPers did not came down the fox way for its exact qualities as a highly expressive interpreter.
Too bad that ceteris paribus is nearly never possible:
preferences differ with clients and countries, on the mobile front python is weaker (least on android, but still...)
but as a language python is hard to beat.
>PS: As far as I am concerned, I have used python on the web and liked it and on my way back to use it via wxpython to translate a significant code base from foxpro to plain vanilla python:) I'd be glad to get pointers on "best practices" to replace cursor-based and local sql DML operations within python. I'be be glad to avoid running via additional database layers whenever possible!
Avoiding additional layers ***and*** having vfp capabilities is somewhat antagonistic in other languages ;-)
The dbapi2 gives you mostly backend neutral SQL into pure memory "cursors".
Think SQL-PT with target a cursor only in memory but more OO/cursor-like than select into array.
DABO enhances those quite a bit enabling SQL-access onto them, like you are used to query vfp cursors in SQL.
No xBase, as "records" can be navigated to in memory. Some change/memento-handling,
but for my taste still quite a bit missing from the things I enjoy in vfp - but possible to add, as it is OS -
and I added some functionality to the CAs used in my vfp apps as well ;-)
So I second John's post, but urge you to verify **first** that the things YOU utilize/enhanced from the vfp world are there.
Some of the things I think of as important are not there yet, but I hope to get a budget to add in those areas.
Or you are lucky in that the things you used from vfp are already implemented.
Runners up / areas for further reading:
SQL-Layer of SqlAlchemy (you don't need the ORM stuff, only parts of the SQL-abstraction)
DAL - layer in Web2py (does not try to go too far into ORM, but creates own syntax I personally dislike - think LINQ)
and perhaps just to get ideas from another, but similar side, read up on activerecord pattern usage in RoR
(think Scatter name on Steroids - still with ORM redirection/fluff but with care to minimize setup pains)
regards
thomas
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement