> It's late and I'm frustrated. Nonetheless I though I put a rant out there > (and > be it just to make me feel better): > > <rant> > > So I've been toying all day with TG2 and honestly I'm frustrated. Some > problems are to be expected, but a pretty much 80% rewrite of code certainly > is not. > Basically what I find is that so many things are majorly different or not > even > existant, that a migration from a TG1 app to a TG2 app is pretty much a > complete rewrite. > > The whole "how SA is bound into things" requires a lot of rewrite. So > basically (besides the changes from SA 4.x to SA 5.x which the TG team can't > be blamed for - although I must say the SA team basically trashed the old > API > in favor of a new API - which in my case means going over 10k+ lines of > code - yet another reason why I hate ORMs) TG2 doesn't behave anywhere near > as TG1 did unless you trust SA to do the right thing with your database. > Reusing a currently available database is pretty much out of the question > unless you meddle a lot with the TG2 initialization (3 posts today alone on > the mailing list confirm that this is a problem for quite some people) > > After you tackled the whole SA thing, you find out that the whole > auth/identity is nowhere near being as convenient or compatible as it was in > TG1. Now you have to fiddle with HTTP request headers you pull out of a > request object which may or may not be defined. Anyone who wrote an app that > relies on authentication is pretty much screwed right there. Registration > is > non-existant. Do you really expect anyone to push up a website where nobody > can sign up? I don't see a reason to use a framework like TG for static > pages > which don't require auth. Any simple PHP code can do that. The beauty of TG1 > was that every page could be adapted to the view of the currently > authenticated user. > > Auth used to be a simple > > from turbogears import identity > > if identity.current.anonymous: > do something > else: > uid=identity.current.user.user_id > whatever you do with uid > > Now identitiy isn't even defined if the request is anonymous.Also grabbing > the > uid is something like requesting the uid from a dict which may or may not be > defined or may / may not contain a repoze.something object. > This is majorly inconvenient and will definitely keep people from adopting > TG2. I'm even considering rewriting my whole 500k+ lines application to > something different than TG altogether, simply because I basically rewrite > the whole thing on my way to TG2 and I'm afraid the next time around I will > touch another hundred thousand lines to go to TG2.x. TG1 sucks in terms of > speed (2 requests per second is nothing I would call "speed"), so my hope > was > that TG2 may remedy that. Currently I think it will take me weeks, if not > months to just get the basic homepage working with TG2. That's definitely > not > a migration path many people will adopt. > > My current app has over 2000 references to identity. All of which need to be > rewritten with multiple lines of code. Big bummer right there. What was > wrong > with the old identity object that it's worth to dump it in favor of > something > more complicated which actually accomplishes less than what the old identity > did? > Can't there be an API consistent wrapper of some kind? > > Compatibility is a big issue with TG2. IMHO it's probably not worth to do a > migration. One might just chose to rewrite the app using some other > framework > that shows more consistency. > > I know everyone on the TG team invested a lot of effort into TG2 and I > certainly appreciate that. But I think to make TG really a framework of > choice for large apps requires a bit more backward compatibility to make it > a > viable choice. Particularly corporate size adopters like to see a clean > migration path between versions. Currently with TG the path is something > like "yeah, you can reuse about 20% of your code, the rest needs to be > rewritten - sorry about that". > > </rant>
I don't think it's surprising what you describe so there is no reason to be upset. I mean you can be upset but you cannot say it's unexpected. It has been said many times on this list and other places that tg2 is a big step away from tg1. It has been said that backward compatibility will not be maintained because of introducing new features. I don't think there is anything wrong with that, that is how projects evolve. What gave you the impression that the tg1 API will remain more or less the same in tg2? Maybe you just hoped for it but had no real reason for it because nobody promised anything like this? I suspect this is the case. I'm still using tg1 because for my needs it is perfect. I could use some tg2 features but I'm fully aware of the issues you describe concerning tg1 --> tg2 migration. So I will only migrate if the work of a nearly complete rewrite is worth it. At the moment it is not, so I'm sticking with tg1. Actually, there was word about tg 1.5 and/or a tg1 version that will be built on cherrypy 3. I guess the migration from the old tg1 to these newer tg1 versions will be much smoother and will be for sure worth it. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

