upgrade your own app

46 views
Skip to first unread message

pa...@cancamusa.net

unread,
Jun 24, 2013, 1:56:47 PM6/24/13
to web...@googlegroups.com
How do you guys release upgrades of your own apps?

The setup is:

- You write a web2py app and release the code.
- Several people install it on their servers.
- They change the database connection string, and little more. It works for real.
- Over time, they customize css files, even some views.
- You write non-radical updates for your web2py app, but that includes models, controllers, views, and static js and css files.

Now you want them to install the new code, but they have to update the one line in db.py that connects to the database, and they want to keep their data, logos, css, and views.

I didn't find a standard place in the book for this.

Thanks for your ideas/suggestions

Niphlod

unread,
Jun 24, 2013, 2:50:45 PM6/24/13
to web...@googlegroups.com
for models, it's as easy as using a single file called models/0_connection.py that holds the "customizable bits" (e.g. the DAL connection string) and using a models/db.py for your "static things", i.e. your define_tables statements.

For updates to views that they customized in the meantime and you changed in the upgrade, it's not a simple task...everything that you change may (or not) collide with their own customizations.

Tim Richardson

unread,
Jun 24, 2013, 5:13:05 PM6/24/13
to web...@googlegroups.com

This sounds a lot like the reason shared version control was invented, which provides tools to manage simultaneous development on the same code base. This is actually how web2py is developed, although of course with the expectation that changes will be merged.
Look at github.

pa...@cancamusa.net

unread,
Jun 24, 2013, 5:50:48 PM6/24/13
to web...@googlegroups.com
I was looking at comparisons of such websites, but I though that must
be a common issue fo web2py developers, so that's why I asked. I can
design the app in such a way that this problem does not arise, but it
would take more work and I would be wasting the great admin interface.
My time is limited and I have quite a list of interesting feature
requests.

However, I was considering mercurial-compatible websites instead of
git-based, because that's what web2py uses. I'll probably use savannah.

Thanks
> --
>
> ---
> You received this message because you are subscribed to a topic in
> the Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/XePfxiCRjVw/unsubscribe [1].
> To unsubscribe from this group and all its topics, send an email to
> web2py+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out
> [2].
>
>
>
> Links:
> ------
> [1] https://groups.google.com/d/topic/web2py/XePfxiCRjVw/unsubscribe
> [2] https://groups.google.com/groups/opt_out

Tim Richardson

unread,
Jun 24, 2013, 6:05:18 PM6/24/13
to web...@googlegroups.com
web2py uses github and/or google code, developer's choice.

LightDot

unread,
Jun 25, 2013, 8:08:00 AM6/25/13
to web...@googlegroups.com
The way you describe the environment, it's impossible to bring deterministic automated updates. If you have users customizing views, css, etc., there is bound to be some manual intervention needed if your updates also include views, css, etc.

You could use git, mercurial or a similar tool, but users would need to be versed enough to merge their own changes, etc. I don't see this approach as really being viable unless it's a very specific target group, ie. developers, system administrators, etc. Well, not even then... People do crazy things, or at least things you don't expect. User creativity (and "creativity") never stops to amaze me... So, it would be better to request users to submit their changes first and then create personalized updates - hopefully, you'll be getting paid for such support :)

I'd approach this problem as any other OS package - use separate config files that don't get updated, have app files that get overwritten on every update. Each operating system or a distribution has pretty good tools to achieve this - rpm, deb, etc. But if you need to, let's say, update the views, users will simply loose their customized views. There is no way around this.

Regards,
Ales


On Monday, June 24, 2013 7:56:47 PM UTC+2, pa...@cancamusa.net wrote:
Reply all
Reply to author
Forward
0 new messages