[web2py] SPA vs ROCA (and greetings)

2013-05-20 Thread Jay Martin
Greetings All,

I'm new here. Congratulations on building a great framework and community! 
I hope to learn and contribute along with you.

I don't have a specific technical problem. However, I will share a question 
stemming from my current state of curiosity about web app architectures 
that you might enjoy chiming in on:

*Where does web2py fall between the polar extremes of Single Page 
Applications (SPA) and 
Resource Oriented Client Architecture (ROCA) , and 
in which direction would you personally like to see it shift in the future 
(for web3py and web3py backports to web2py)? *(It's possible that by 
ignorance, I've selected a poor choice of opposites. In which case you 
might suggest your own pair.)

*Personal Context* (in case your curious):

*Motivation: *To create food planning/shopping related web app to disrupt 
the way things are currently done ; Fall-back plan to become expert in all 
things web app related (development and design). I'm in it for the long 
haul!

*Stack History:* I started studying web dev a year ago and studied an 
immature SPA framework for several months, after learning the basics of 
JavaScript, HTML and CSS. Through my naivety I only recently discovered the 
problems involved with SPA regarding SEO crawlability etc. Instead of 
"JavaScript Everywhere!" as advertised, PHP was recommended to handle the 
server-side stuff. I choose not to learn PHP out of concern for its 
security and overall design incohesiveness.

I compared Rails and Django. Python's readability won out. While Django's 
community is larger, I sense something special going on here and I want to 
be a part of it. Also, the web2py components and built in ajax support 
clinched it for me. 

I enjoyed the free CS101 course in Python at Udacity.com, but it didn't 
cover OO, so I'm now reading Monty/Karel in 
Python.
 
I hope to be up to speed soon. In the mean time, *if I can help with 
anything at all, please let me know.*
*
*
All my best,

Jay
Meals7, Inc.
webapphero.com

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: SPA vs ROCA (and greetings)

2013-05-20 Thread Jay Martin
Thanks for letting me know about web2py's flexibility, Derek. Per your take 
on OO relevance, I'll slow down on that and dig right into the nuts and 
bolts of web2py. Fun!


On Monday, May 20, 2013 1:22:55 PM UTC-4, Derek wrote:
>
> Where does it fall? Probably more near ROCA than SPA, but you can build 
> your apps however you want. It's open enough to allow both of those use 
> cases. OO may be helpful, but it's not necessary with Web2py. Web2py just 
> gives you all the help you need to build your app as quickly as possible. 
> It does so in a way that by default will be secure. 
>
> As far as future direction? I'm happy with how it is now, I wouldn't want 
> to change it, except perhaps to fork it's core to a smaller wsgi toolset 
> framework.
>
> I've written all kinds of web apps, my favorite right now is SPA because 
> it reduces latency, and bandwidth. It seems like so much waste with loading 
> everything again on each page load for each user action.
>
> On Monday, May 20, 2013 1:10:49 AM UTC-7, Jay Martin wrote:
>>
>> Greetings All,
>>
>> I'm new here. Congratulations on building a great framework and 
>> community! I hope to learn and contribute along with you.
>>
>> I don't have a specific technical problem. However, I will share a 
>> question stemming from my current state of curiosity about web app 
>> architectures that you might enjoy chiming in on:
>>
>> *Where does web2py fall between the polar extremes of Single Page 
>> Applications (SPA) <http://en.wikipedia.org/wiki/Single-page_application>and 
>> Resource Oriented Client Architecture (ROCA) <http://roca-style.org/>, 
>> and in which direction would you personally like to see it shift in the 
>> future (for web3py and web3py backports to web2py)? *(It's possible that 
>> by ignorance, I've selected a poor choice of opposites. In which case you 
>> might suggest your own pair.)
>>
>> *Personal Context* (in case your curious):
>>
>> *Motivation: *To create food planning/shopping related web app to 
>> disrupt the way things are currently done ; Fall-back plan to become expert 
>> in all things web app related (development and design). I'm in it for the 
>> long haul!
>>
>> *Stack History:* I started studying web dev a year ago and studied an 
>> immature SPA framework for several months, after learning the basics of 
>> JavaScript, HTML and CSS. Through my naivety I only recently discovered the 
>> problems involved with SPA regarding SEO crawlability etc. Instead of 
>> "JavaScript Everywhere!" as advertised, PHP was recommended to handle the 
>> server-side stuff. I choose not to learn PHP out of concern for its 
>> security and overall design incohesiveness.
>>
>> I compared Rails and Django. Python's readability won out. While Django's 
>> community is larger, I sense something special going on here and I want to 
>> be a part of it. Also, the web2py components and built in ajax support 
>> clinched it for me. 
>>
>> I enjoyed the free CS101 course in Python at Udacity.com, but it didn't 
>> cover OO, so I'm now reading Monty/Karel in 
>> Python<http://www.amazon.com/Monty-Karel-Introduction-Object-Oriented-Programming/dp/0970579527>.
>>  
>> I hope to be up to speed soon. In the mean time, *if I can help with 
>> anything at all, please let me know.*
>> *
>> *
>> All my best,
>>
>> Jay
>> Meals7, Inc.
>> webapphero.com
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: web2py components and browser history

2013-05-28 Thread Jay Martin
Thanks for the great detail. I'm curious if you were able to smooth out the 
flakiness you mentioned or have made any new discoveries since last year? 
Thanks!

Jay

On Saturday, January 21, 2012 6:30:58 AM UTC-5, LightDot wrote:
>
> It seems that nobody cares much for web2py, ajax and browser back buttons 
> :) Nevertheless, I made some progress and thought I'd post some findings 
> here If anyone searches the group with a similar goal.
>
> Let me describe the problem once again. Imagine a scenario:
>
> 1) visitor is on Google, searches for a web2py powered site, finds it, 
> follows the link
> 2) site loads
> 3) visitor sees an internal link which loads a web2py component (ajax 
> call) with new content, follows the link, component loads
> 4) visitor reads the content, wants to go back, uses the browser back 
> button...
> 5) KABOOM, user is back on Google instead on the first page of the site
>
> which is pretty bad as far as user experience goes.
>
> Anyway, our site has a number of components that can work as regular pages 
> (.load and .html do the same thing) so what I really need is a way for a 
> component to tell the browser it has loaded. To solve this, i need to 
> manipulate the browser history manually.
>
> Sadly, current state of things is pretty messy on the browser side. After 
> looking at what's available, I found several solutions but none of them 
> perfect. I decided to give up on Internet Explorer 8 and 9 completely. 
> Sorry folks, you're on your own. IE 10 *should* work as it comes out... 
> yes, I believe in Santa. :)
>
> So, the first thing I tried was using the native browser's history API 
> [1], which all modern HTML5 browsers have (yes, forget IE9). It looks fine 
> on paper, but the implementation has some problems. Chromium / Chrome 
> behaves differently than Firefox/Opera/Safari in one crucial point (fires 
> initial onpopstate, I even managed to crash Chromium) [2], so I had to 
> abandon using this API directly. If it wasn't for this Chromium issue, it 
> would be the perfect solution.
>
> Then I tried using the history.js [3]. This project has a long history of 
> successfully coping with ajax/browser history issues, so I was optimistic. 
> But sadly, history.js's master branch (version 1.7.1) also works in a way 
> that pushState and replaceState will immediately trigger onpopstate, 
> which is not what I wanted [4]. Luckily, the devel branch (1.8.0-dev) got 
> an additional State.internal [5] with this commit [6], so I can tell if 
> onpopstate is triggered by the browser's buttons or not.
>
> Ok, long story is coming to an end. It's time for some code. This is what 
> I'm currently at:
>
> - set the history entry in the component's controller:
> response.js = 
> "History.pushState({isMyPageName:1},'','"+URL('some','thing',extension=False)+"')"
>
> -at the end of layout.html:
> 
>(function(window,undefined){
> var History = window.History;
> if ( !History.enabled ) {
> return false;
> }
> History.Adapter.bind(window,'statechange',function(){
> var State = History.getState();
> if (( State.data.isMyPageName == 1 ) && ( State.internal 
> == false )) {
> //alert("data: " + JSON.stringify(State.data) + " 
> title: " + State.title + " url: " + State.url + " internal: " + 
> State.internal);
> window.location = State.url;
> }
> });
> })(window);
> 
>
> Ok, that's about it... The solution is flaky at times and I still need to 
> manipulate document.title, haven't gotten to that yet. But it works, 
> web2py components can silently change the browser url as they load. And no 
> &#&%/ URL hashes and hashbangs...
>
> [1] https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history
> [2] 
> https://github.com/balupton/history.js/wiki/The-State-of-the-HTML5-History-API
> [3] https://github.com/balupton/history.js
> [4] https://github.com/balupton/history.js/issues/47
> [5] https://github.com/balupton/history.js/tree/dev
> [6] 
> https://github.com/balupton/history.js/commit/c79c17f9801373f5218f144088c387f1935f3462
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] SSL CDN (free)

2013-07-06 Thread Jay Martin
Just found a free SSL CDN and wanted to share with everyone:

http://www.jsdelivr.com/

Hope this helpful for someone...

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: web2py official site erroneously displays mobile view from google search

2014-03-04 Thread Jay Martin
I shouldn't have reduced the size of my screenshot to save bits, because it 
makes my viewport look small. My monitor is 1920 x 1080 and chrome is full 
screen. The mobile view is only returned from google's search results and 
not from directly visiting the site. I think incognito mode should rule out 
cookies. I'm not sure what might be causing this, but its been going on for 
a couple months.

Thanks you all for testing.

My best,

Jay



On Tuesday, March 4, 2014 1:29:00 PM UTC-5, Jim S wrote:
>
> I should clarify.  I can reproduce it but don't feel it is an issue.  In 
> my opinion, this is the way responsive sites are supposed to work.
>
>


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Latest thinking -- Bootstrap vs. Foundation?

2014-03-15 Thread Jay Martin
Hi Arnon,

Please see this post if you're interested in helping to test BS3 or want to 
keep up with the 
progress: https://groups.google.com/forum/#!topic/web2py/oSABtjmnYM0

My best,

Jay

On Tuesday, March 11, 2014 1:18:41 PM UTC-4, Arnon Marcus wrote:
>
> Any news on this?
>
> When should BS3 be expected to be int the default (welcome) app?
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Init Script in Web2Py

2014-03-31 Thread Jay Martin
I'm confused as to why this scenario needs caching.

Isn't it true that for an empty user table:

if cache.ram('init',lambda:db(db.auth_user).isempty(),None):
   arbitrary_function()

will only cache the boolean value True and keep that value (True) in cache 
forever (until the app is restarted), associated with the given key 'init'?

Therefore, only this initial state is remembered. All future executions of 
this code will only ever return this initial value (True), therefore the 
subsequent arbitrary function will continue to be executed every cycle of 
execution.

Am I missing something? Many thanks!



On Friday, August 10, 2012 11:23:56 PM UTC-4, Massimo Di Pierro wrote:
>
> you stil want to cache that
>
> if cache.ram('init',lambda:db(db.mytable).isempty(),None):
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Seeking advice on Heroku db parity

2014-10-21 Thread Jay Martin
According to this Heroku article 
,
 
subtle differences between Postgres and Sqlite may cause hard to 
troubleshoot problems when using Sqlite locally and Postgres in production.

Web2py includes a script "heroku.py" that uses a Sqlite db for local 
development. 

I'm curious if anyone has tried using Postgres for local development and 
whether it created more problems than it intends to prevent. Is there 
anything about web2py in particular that would caution me against following 
Heroku's recommended best practice?

Thank you for any experience or advice!

My best,

Jay

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Correction for setup-web2py-heroku.sh script

2014-10-22 Thread Jay Martin
Currently the setup-web2py-heroku.sh script includes these commands:


sudo pip install virtualenv
sudo pip install psycopg2
virtualenv venv --distribute
source venv/bin/activate
pip freeze > requirements.txt


Shouldn't we want to install psycopg2 into the virtualenv named venv by 
moving the psycopg2 install command after venv is created? Like so:


sudo pip install virtualenv
virtualenv venv --distribute
source venv/bin/activate
sudo pip install psycopg2
pip freeze > requirements.txt


My best,

Jay

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Correction for setup-web2py-heroku.sh script

2014-10-25 Thread Jay Martin
Thanks Massimo,

I'll try it out and submit a PR if the new way doesn't break anything.

My best,

Jay

On Thursday, October 23, 2014 10:20:59 AM UTC-4, Massimo Di Pierro wrote:
>
> It is a matter of preference but I think you are right. Your approach is 
> best.
>
>
> On Wednesday, 22 October 2014 14:31:09 UTC-5, Jay Martin wrote:
>>
>> Currently the setup-web2py-heroku.sh script includes these commands:
>>
>>
>> sudo pip install virtualenv
>> sudo pip install psycopg2
>> virtualenv venv --distribute
>> source venv/bin/activate
>> pip freeze > requirements.txt
>>
>>
>> Shouldn't we want to install psycopg2 into the virtualenv named venv by 
>> moving the psycopg2 install command after venv is created? Like so:
>>
>>
>> sudo pip install virtualenv
>> virtualenv venv --distribute
>> source venv/bin/activate
>> sudo pip install psycopg2
>> pip freeze > requirements.txt
>>
>>
>> My best,
>>
>> Jay
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: admin access under gunicorn on Heroku

2014-11-08 Thread Jay Martin
I followed this step with the exception of the -u www-data because that 
user isn't present on my os x system and heroku nor gunicorn docs mention 
it.

I still receive the access denied message "admin disabled because unable to 
access password file" even though I have a parameters_443.py file. My site 
https://teststeps.herokuapp.com/ 
now has 2 paramters_.py files. The port 5000 file works for running 
locally with 'foreman start web'. 

Each heroku dyno sets the PORT var. I'm not sure why its not working. Any 
suggestions are appreciated...

My best,
Jay

On Thursday, May 2, 2013 9:14:49 AM UTC-4, Massimo Di Pierro wrote:
>
> sudo -u www-data python -c "from gluon.main import save_password; 
> save_password(raw_input('admin password: '),443)"
>
> replace 443 with PORT
>
>
>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: auth.messages.verify_email html template

2014-11-22 Thread Jay Martin
@Lisandro, would happen to have these code snippets handy to share? I'm 
interested in using the mailgun api too. Either way, thanks for checking!

My best,
Jay

On Tuesday, October 29, 2013 5:46:51 PM UTC-4, Lisandro wrote:
>
>  ...
>
> For those interested in doing that, is just as simple as instantiating 
> Auth class and overwriting wanted methods, for example, I overwrited 
> "register" and "email_reset_password" methods in Auth class, that is, to 
> send my custom emails on register and request reset password respectively.
>
> Regards, Lisandro.
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: auth.messages.verify_email html template

2014-11-22 Thread Jay Martin
Extremely helpful! Thanks Lisandro. I'll be sure to share any tweaks...

On Saturday, November 22, 2014 8:56:06 AM UTC-5, Lisandro wrote:
>
> ...
>
> I hope it helps!
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.