Client-Side Scripting

9 views
Skip to first unread message

pro.cy...@gmail.com

unread,
Dec 28, 2016, 6:16:13 AM12/28/16
to Reahl discuss
I've been intermittently studying Reahl for the past week, and after just finished watching a video from EuroPython 2015 today where Iwan Vosloo introduced Reahl and a bit of what it can do, I felt compelled to inquire once again about a question that was proposed at 29:32.

https://youtu.be/xjKRJHaRQ0Y?t=1773

Is it possible to perform client side scripting or is it in the works?  The reason I ask is because I have been highly interested in scale out systems, and while you could make a scale out system like this... it would be very expensive.  If the processing could be offloaded to the client it would save a lot on server-side load.

Thinking of AWS lambda where you only pay for the processing time of your code, or even standard load-balanced EC2 instances where you would need to scale out more quickly as there would be more demand server-side.

I like the Idea of the Reahl framework, and would like to use it but I also want to think about the future.

Iwan Vosloo

unread,
Dec 29, 2016, 1:22:23 AM12/29/16
to reahl-...@googlegroups.com
Hello.

We want casual users of Reahl to be shielded from complexities such as
client side scripting and CSS. HOWEVER, if you are prepared to move to
the next level of learning you can build your own Widgets. When you
build your own Widget you can do anything you like - using techniques
tutorial.pagerbootstraptutorial.pagerbootstrapthat you would have used
with a traditional framework.

So, where we do computation or even generation of HTML really depends on
a specific Widget. One example where we modify HTML on the client side
via javascript is where validation errors are picked up client-side. The
rendering of those errors happen in javascript (most of this logic if
performed client side by jquery-validate plugin, with some modifications
and add-ons).

Another example is the PageMenu Widget as used in: the
"tutorial.pagerbootstrap" example. It has to change the current page,
and the list of pages displayed without going to the server. (See the
implementation here:
https://github.com/reahl/reahl/blob/master/reahl-web/reahl/web/bootstrap/reahl.pagination.js)

We do these things because it makes sense from a usability point of view.

We're not philosophical about the issue of scaling - we're practical. If
we hit an issue we have a concrete example usage and can then deal with
it in context.

Right now, you can scale horizontally by adding more webservers and more
database servers. Where code can make decisions on the client we do it.
But, inherently code often needs data - and that data often is the
bottleneck which sits in the database.

The general case of distributing computation is a more tough problem to
solve. Data being one aspect of it. There are others, such as whether
you trust that the client will execute what you sent to it, instead of
executing things differently in order to circumvent certain business
rules of access control implemented by your application. There's also
transactional integrity and concurrency issues.

Regards
- Iwan
> --
> You received this message because you are subscribed to the Google
> Groups "Reahl discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to reahl-discus...@googlegroups.com
> <mailto:reahl-discus...@googlegroups.com>.
> To post to this group, send email to reahl-...@googlegroups.com
> <mailto:reahl-...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/reahl-discuss.
> For more options, visit https://groups.google.com/d/optout.


--

Reahl, the Python only web framework / www.reahl.org
Reply all
Reply to author
Forward
0 new messages