Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-04 Thread cjrh
On Thursday, 4 August 2011 00:25:19 UTC+2, Phyo Arkar wrote:

 14 MB is small  for you Dosen't mean thats small for  other part of of 
 the world. Here connection speed is Averaged to 64 kbit/s to 256kbit/s  and 
 random (Frequent) disconnects , people believes 1 MB is already big. zipped 
 web2py is already 6.9MB.

 Plus Bandwidth concern. I use my own Dedicated and VPS servers to host. 
 They are already busy , and Bigger file-size = more bandwidth , 10MB * 
 Download  already 10 GB . If this become popular , bandwidth cost will be 
 great..


I reread your initial post and see that you want to offer download bundles 
of your apps packaged together with web2py.  I suggest you do what I did, 
which is run an application called TreeSizeFree on your web2py folder, and 
find all the large files that are not needed and delete them.  Here I am 
referring to things like README, and so on.   

How do you deal with the Python dependency? 


Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-04 Thread Phyo Arkar
Everything else is pretty much decoupled. sqlhtml.py depends on dal.py
and html.py. shell.py depends on everything because acts like main but
from shell.

Thanks massimo , But things like contrib, which suppose to be not very
critical module , but it cannot be removed coz important module like
main.py html.py depends on contrib. And if i decide , OK i can live
without html helpers and goes to remove html.py, but i can't coz  it
is used by many important modules :

globals.py:from html import xmlescape, TABLE, TR, PRE
html.py:from htmlentitydefs import name2codepoint
main.py:from html import URL as Url
restricted.py:from html import BEAUTIFY
sanitizer.py:from htmllib import HTMLParser
sanitizer.py:from htmlentitydefs import entitydefs
serializers.py:from html import TAG
serializers.py:from html import xmlescape
sqlhtml.py:from html import XML, SPAN, TAG, A, DIV, UL, LI, TEXTAREA,
BR, IMG, SCRIPT
sqlhtml.py:from html import FORM, INPUT, LABEL, OPTION, SELECT
sqlhtml.py:from html import TABLE, THEAD, TBODY, TR, TD, TH
sqlhtml.py:from html import URL as Url
tools.py.orig:from html import *

and so on ..


I reread your initial post and see that you want to offer download bundles of 
your apps
packaged together with web2py.  I suggest you do what I did, which is run an 
application
called TreeSizeFree on your web2py folder, and find all the large files that 
are not needed
and
delete them.  Here I am referring to things like README, and so on.

Thanks , i will see that app.

 How do you deal with the Python dependency?
That is one of the problem too, i also made a question about Python
Dependency on StackOverflow , if it is possible to include directly
inside a bundle. Results are good for Windows coz it have Portable
Python but not so well for *Nix variants .

http://stackoverflow.com/questions/6705193/easy-deploying-of-python-and-application-in-one-bundle-for-linux


On 8/4/11, cjrh caleb.hatti...@gmail.com wrote:
 On Thursday, 4 August 2011 00:25:19 UTC+2, Phyo Arkar wrote:

 14 MB is small  for you Dosen't mean thats small for  other part of of
 the world. Here connection speed is Averaged to 64 kbit/s to 256kbit/s
 and
 random (Frequent) disconnects , people believes 1 MB is already big.
 zipped
 web2py is already 6.9MB.

 Plus Bandwidth concern. I use my own Dedicated and VPS servers to host.
 They are already busy , and Bigger file-size = more bandwidth , 10MB *
 Download  already 10 GB . If this become popular , bandwidth cost will be
 great..


 I reread your initial post and see that you want to offer download bundles
 of your apps packaged together with web2py.  I suggest you do what I did,
 which is run an application called TreeSizeFree on your web2py folder, and
 find all the large files that are not needed and delete them.  Here I am
 referring to things like README, and so on.

 How do you deal with the Python dependency?



Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-03 Thread cjrh
Here is a printout showing the general space consumption (attached).  My 
web2py src, not including the .hg folder is about 14.3MB.

web2py_size.pdf
Description: Adobe PDF document


Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-03 Thread Jonathan Lundell
On Aug 3, 2011, at 3:48 AM, cjrh wrote:

 Here is a printout showing the general space consumption (attached).  My 
 web2py src, not including the .hg folder is about 14.3MB.web2py_size.pdf

Hmm. I've got iPhone apps 20 times that size...

Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-03 Thread cjrh
That was my feeling also.

Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-03 Thread Michele Comitini
I agree, that size is small even on embedded systems by now...
Anyway trying to keep it small is always a good thing IMHO.

mic

2011/8/3 Jonathan Lundell jlund...@pobox.com:
 On Aug 3, 2011, at 3:48 AM, cjrh wrote:

 Here is a printout showing the general space consumption (attached).  My
 web2py src, not including the .hg folder is about 14.3MB.web2py_size.pdf

 Hmm. I've got iPhone apps 20 times that size...


Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-03 Thread cjrh
On Wednesday, 3 August 2011 16:22:46 UTC+2, mcm wrote:

 I agree, that size is small even on embedded systems by now...
 Anyway trying to keep it small is always a good thing IMHO.


I think the word small is the wrong word to use here.  It doesn't really 
mean anything.  It is a relative word that only has meaning in comparison to 
something else.   If there are files within web2py that are not used, then 
they should be removed regardless of the effect on size.  I think the OP was 
saying or suggesting that it should be possible to remove files that are not 
needed on a per-installation basis.  But my follow-up question to that would 
be why? Sheer size doesn't seem to be a compelling-enough reason by itself.



Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-03 Thread Richard Vézina
Syst admin like make system hardening...

That could be an answer...

Richard

On Wed, Aug 3, 2011 at 10:34 AM, cjrh caleb.hatti...@gmail.com wrote:

 On Wednesday, 3 August 2011 16:22:46 UTC+2, mcm wrote:

 I agree, that size is small even on embedded systems by now...
 Anyway trying to keep it small is always a good thing IMHO.


 I think the word small is the wrong word to use here.  It doesn't really
 mean anything.  It is a relative word that only has meaning in comparison to
 something else.   If there are files within web2py that are not used, then
 they should be removed regardless of the effect on size.  I think the OP was
 saying or suggesting that it should be possible to remove files that are not
 needed on a per-installation basis.  But my follow-up question to that would
 be why? Sheer size doesn't seem to be a compelling-enough reason by itself.




Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-03 Thread Phyo Arkar

 Syst admin like make system hardening...

 That could be an answer...


Yes i am more into Sys Admin than web-developer , you've read my mind Richard
Vézina


Ok my concern is not really about the File size but the  Code Base size
(lines of code , number of features).

Here is what i have:

1 . Its best to keep as light ( codebase wise )  as possible .
2 . When you know  features in this module is not going to be use , you
should be able to remove it.
3 . Smaller  codebase == Easier to debug
4 . Easier to Debug == Easier to Modify == More incentives for Contributions
5 . Sys admins hates Bloat-ness (even tho we are FAT :P )
6 . Security , easier to control when unwanted modules can be removed.


I also still care about file-size too :

14 MB is small  for you Dosen't mean thats small for  other part of of the
world. Here connection speed is Averaged to 64 kbit/s to 256kbit/s  and
random (Frequent) disconnects , people believes 1 MB is already big. zipped
web2py is already 6.9MB.

Plus Bandwidth concern. I use my own Dedicated and VPS servers to host. They
are already busy , and Bigger file-size = more bandwidth , 10MB * Download
already 10 GB . If this become popular , bandwidth cost will be great..




On Wed, Aug 3, 2011 at 9:04 PM, cjrh caleb.hatti...@gmail.com wrote:

 On Wednesday, 3 August 2011 16:22:46 UTC+2, mcm wrote:

 I agree, that size is small even on embedded systems by now...
 Anyway trying to keep it small is always a good thing IMHO.


 I think the word small is the wrong word to use here.  It doesn't really
 mean anything.  It is a relative word that only has meaning in comparison to
 something else.   If there are files within web2py that are not used, then
 they should be removed regardless of the effect on size.  I think the OP was
 saying or suggesting that it should be possible to remove files that are not
 needed on a per-installation basis.  But my follow-up question to that would
 be why? Sheer size doesn't seem to be a compelling-enough reason by itself.




Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-03 Thread Phyo Arkar
 Plus Bandwidth concern. I use my own Dedicated and VPS servers to host.
 They are already busy , and Bigger file-size = more bandwidth , 10MB *
 Download  already 10 GB . If this become popular , bandwidth cost will be
 great..



Errata:

10MB * 1000 Downloads already 10GB. My bandwidth limit is 80 GB amonth.


On Thu, Aug 4, 2011 at 4:55 AM, Phyo Arkar phyo.arkarl...@gmail.com wrote:

 Syst admin like make system hardening...

 That could be an answer...


 Yes i am more into Sys Admin than web-developer , you've read my mind 
 Richard
 Vézina


 Ok my concern is not really about the File size but the  Code Base size
 (lines of code , number of features).

 Here is what i have:

 1 . Its best to keep as light ( codebase wise )  as possible .
 2 . When you know  features in this module is not going to be use , you
 should be able to remove it.
 3 . Smaller  codebase == Easier to debug
 4 . Easier to Debug == Easier to Modify == More incentives for
 Contributions
 5 . Sys admins hates Bloat-ness (even tho we are FAT :P )
 6 . Security , easier to control when unwanted modules can be removed.


 I also still care about file-size too :

 14 MB is small  for you Dosen't mean thats small for  other part of of
 the world. Here connection speed is Averaged to 64 kbit/s to 256kbit/s  and
 random (Frequent) disconnects , people believes 1 MB is already big. zipped
 web2py is already 6.9MB.

 Plus Bandwidth concern. I use my own Dedicated and VPS servers to host.
 They are already busy , and Bigger file-size = more bandwidth , 10MB *
 Download  already 10 GB . If this become popular , bandwidth cost will be
 great..





 On Wed, Aug 3, 2011 at 9:04 PM, cjrh caleb.hatti...@gmail.com wrote:

 On Wednesday, 3 August 2011 16:22:46 UTC+2, mcm wrote:

 I agree, that size is small even on embedded systems by now...
 Anyway trying to keep it small is always a good thing IMHO.


 I think the word small is the wrong word to use here.  It doesn't really
 mean anything.  It is a relative word that only has meaning in comparison to
 something else.   If there are files within web2py that are not used, then
 they should be removed regardless of the effect on size.  I think the OP was
 saying or suggesting that it should be possible to remove files that are not
 needed on a per-installation basis.  But my follow-up question to that would
 be why? Sheer size doesn't seem to be a compelling-enough reason by itself.





Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-03 Thread Phyo Arkar
Actually more Modularizing inside Gluon should be made easy.

putting all core features into gluon/core , everything that related into
gluon/dal , those can be removed without problem into its own folders etc.

I will look into this first.

On Thu, Aug 4, 2011 at 4:58 AM, Phyo Arkar phyo.arkarl...@gmail.com wrote:


 Plus Bandwidth concern. I use my own Dedicated and VPS servers to host.
 They are already busy , and Bigger file-size = more bandwidth , 10MB *
 Download  already 10 GB . If this become popular , bandwidth cost will be
 great..



 Errata:

 10MB * 1000 Downloads already 10GB. My bandwidth limit is 80 GB amonth.



 On Thu, Aug 4, 2011 at 4:55 AM, Phyo Arkar phyo.arkarl...@gmail.comwrote:

 Syst admin like make system hardening...

 That could be an answer...


 Yes i am more into Sys Admin than web-developer , you've read my mind 
 Richard
 Vézina


 Ok my concern is not really about the File size but the  Code Base size
 (lines of code , number of features).

 Here is what i have:

 1 . Its best to keep as light ( codebase wise )  as possible .
 2 . When you know  features in this module is not going to be use , you
 should be able to remove it.
 3 . Smaller  codebase == Easier to debug
 4 . Easier to Debug == Easier to Modify == More incentives for
 Contributions
 5 . Sys admins hates Bloat-ness (even tho we are FAT :P )
 6 . Security , easier to control when unwanted modules can be removed.


 I also still care about file-size too :

 14 MB is small  for you Dosen't mean thats small for  other part of of
 the world. Here connection speed is Averaged to 64 kbit/s to 256kbit/s  and
 random (Frequent) disconnects , people believes 1 MB is already big. zipped
 web2py is already 6.9MB.

 Plus Bandwidth concern. I use my own Dedicated and VPS servers to host.
 They are already busy , and Bigger file-size = more bandwidth , 10MB *
 Download  already 10 GB . If this become popular , bandwidth cost will be
 great..





 On Wed, Aug 3, 2011 at 9:04 PM, cjrh caleb.hatti...@gmail.com wrote:

 On Wednesday, 3 August 2011 16:22:46 UTC+2, mcm wrote:

 I agree, that size is small even on embedded systems by now...
 Anyway trying to keep it small is always a good thing IMHO.


 I think the word small is the wrong word to use here.  It doesn't
 really mean anything.  It is a relative word that only has meaning in
 comparison to something else.   If there are files within web2py that are
 not used, then they should be removed regardless of the effect on size.  I
 think the OP was saying or suggesting that it should be possible to remove
 files that are not needed on a per-installation basis.  But my follow-up
 question to that would be why? Sheer size doesn't seem to be a
 compelling-enough reason by itself.






Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-03 Thread pbreit
Can you make any specific suggestions on what could or should be removed?

As far as I can tell, there is not a lot of stuff that is unused. It's quite 
rare to use Web2py without a database.

The examples app and language files are probably rarely used but aren't 
much harm.

What else would you like to remove?


Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-02 Thread Phyo Arkar
Check it out :

One example.

You cant just remove contrib at all.

It will screwup all the html helper

check this :
$ cat html.py | grep ^from
from HTMLParser import HTMLParser
from htmlentitydefs import name2codepoint
from contrib.markmin.markmin2html import render
from storage import Storage
from highlight import highlight
from utils import web2py_uuid, hmac_hash


you cant just remove utils also

that will screw up html.py too

Too many modules reference each other. as a whole frame work it is
good but if you want to strip down into smaller , lighter web2py , you
will run up into lots of problem.


Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-02 Thread Phyo Arkar
I know i can remove all the apps . yes i had allready done that in my
work project.


On 8/2/11, Anthony abasta...@gmail.com wrote:
 On Monday, August 1, 2011 6:45:52 PM UTC-4, Phyo Arkar wrote:

 I haven't test yest.

 But i am not sure if i remove a module it will break some other features
 as
 web2py does magic import not static.


 Right, I guess you can't actually delete DAL because it is automatically
 imported by the framework. I think you can probably delete tools.py (Auth,
 Crud, Mail). And you should be able to delete any of the apps.

 Anthony



Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-02 Thread Phyo Arkar
I know i can remove all the apps . yes i had allready done that in my
work project.


On 8/2/11, Anthony abasta...@gmail.com wrote:
 On Monday, August 1, 2011 6:45:52 PM UTC-4, Phyo Arkar wrote:

 I haven't test yest.

 But i am not sure if i remove a module it will break some other features
 as
 web2py does magic import not static.


 Right, I guess you can't actually delete DAL because it is automatically
 imported by the framework. I think you can probably delete tools.py (Auth,
 Crud, Mail). And you should be able to delete any of the apps.

 Anthony



Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-02 Thread pbreit
Are you just looking to save a few kilobytes? That doesn't really seem 
worthwhile to me.


Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-01 Thread Anthony
On Monday, August 1, 2011 6:06:11 PM UTC-4, Phyo Arkar wrote: 

 As web2py grow bigger and bigger :

 - There are many many features which are not used, just sits around.
 - If we dont want , have to remove them by hand from web2py
 - If we just want to release a standalone application, web2py is already 
 too big
 - if i want to strip down features i have to look into web2py code , 
 modifying , removing stuff , that will break things and every web2py update 
 i have to redo that work.

 May be in Future , in backward-incompatible version of web2py(may be also 
 possible in this version) , shouldn't we separate web2py into separate 
 components
 eg:

 Web2py-Core (Main web2py Rocket, MVC,Routing)
 Web2py-DAL (DAL SPecific,auth,curd)
 Web2py-Extras (Extra web2py Examples,scaffolding)
 Web2py-Admin (Admin interface)

 
All of these things are already modular in the sense that you can get rid 
of any of them by simply deleting specific files or folders (i.e., you don't 
have to edit any code). Are you saying you just want an easier way to 
download/install exactly what you need without having to bother with any 
deleting?
 
Anthony
 


Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-01 Thread pbreit
I'm not sure this would make sense. Right now, the only extra things you get 
besides Core + DAL are the applications and some docs which are simple to 
delete.

Maybe I'd need to see a real example of what you are talking about. Can't 
you just distribute a package with your app in /applications?


Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-01 Thread Phyo Arkar
I haven't test yest.

But i am not sure if i remove a module it will break some other features as
web2py does magic import not static.

And if new version of web2py comes , i just want to upgrade it in my app.
And i don't want to remove them all again (also new files).


On Tue, Aug 2, 2011 at 5:11 AM, pbreit pbreitenb...@gmail.com wrote:

 I'm not sure this would make sense. Right now, the only extra things you
 get besides Core + DAL are the applications and some docs which are simple
 to delete.

 Maybe I'd need to see a real example of what you are talking about. Can't
 you just distribute a package with your app in /applications?



Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-01 Thread pbreit
What specifically do you want to remove?

I believe you can safely delete these directories:

/doc
/scipts
/applications/admin
/applications/examples
/applications/welcome

In your app, you can delete controllers/appadmin.py


Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-01 Thread Bruno Rocha
I guess you can't delete /admin if you are starting web2py with rocket and
cron enabled.

On Mon, Aug 1, 2011 at 7:51 PM, pbreit pbreitenb...@gmail.com wrote:

 What specifically do you want to remove?

 I believe you can safely delete these directories:

 /doc
 /scipts
 /applications/admin
 /applications/examples
 /applications/welcome

 In your app, you can delete controllers/appadmin.py




-- 



--
Bruno Rocha
[ About me: http://zerp.ly/rochacbruno ]
[ Aprenda a programar: http://CursoDePython.com.br ]
[ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ]
[ Consultoria em desenvolvimento web: http://www.blouweb.com ]


Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-01 Thread Jonathan Lundell
On Aug 1, 2011, at 3:59 PM, Bruno Rocha wrote:

 I guess you can't delete /admin if you are starting web2py with rocket and 
 cron enabled.

How come?

[Isn't 'how come' an odd idiom?]

Most of gluon/contrib could probably go away, depending on the environment. And 
gluon/tests.

 
 On Mon, Aug 1, 2011 at 7:51 PM, pbreit pbreitenb...@gmail.com wrote:
 What specifically do you want to remove?
 
 I believe you can safely delete these directories:
 
 /doc
 /scipts
 /applications/admin
 /applications/examples
 /applications/welcome
 
 In your app, you can delete controllers/appadmin.py
 




Re: [web2py] Do we need a Web2py micro-framework , or split web2py into multiple components ?

2011-08-01 Thread Anthony
On Monday, August 1, 2011 6:45:52 PM UTC-4, Phyo Arkar wrote: 

 I haven't test yest.

 But i am not sure if i remove a module it will break some other features as 
 web2py does magic import not static.

 
Right, I guess you can't actually delete DAL because it is automatically 
imported by the framework. I think you can probably delete tools.py (Auth, 
Crud, Mail). And you should be able to delete any of the apps.
 
Anthony