Question about quick web development

Dear community,

Since I am a data scientist, most of the time I use R, python, and some
ruby for my jobs.
I have zero experience as a front developer including JS/CSS etc.
If I want to present my result to other people with a simple web interface,
what do you think I can do to get started quickly?

Have a nice day~
Kendall

Hi Kendall,

I recommend you to use Roda, a web framework in ruby to present your
results, if you want a dynamic website -- i.e., one where your viewers can
ask your software to create some customized data analysis or plots on the
fly.

This is usually not needed, because you have probably a collection of
analysis that were made before. In this case, you can just use a ruby
library called
webgen to make a static website.

You can also combine both in a useful way.. In this case, the dynamic site
is used only by you to store some metadata (for example how to organize
the information into various sections, subsections etc.) and also data
(figures, writeup etc). Then, you will pull what you need from the
database (created by the dynamic website), and use a script to transform
those into content that can be used by webgen.

I used this approach here Saji Hameed / motus_natus · GitLab. Here
motus_natus.rb is the central program for my dynamic content management
backend.
The script create_static_site.rb collects data from the backend and creates
necessary files needed for webgen to do its job (in static_site/src).

Hope this gives you some ideas. This is not a quick way, but your site may
be more sustainable into the future.

saji

···

On Thu, Nov 25, 2021 at 4:28 PM Kendall Wagner <kendawagner@gmail.com> wrote:

Dear community,

Since I am a data scientist, most of the time I use R, python, and some
ruby for my jobs.
I have zero experience as a front developer including JS/CSS etc.
If I want to present my result to other people with a simple web
interface, what do you think I can do to get started quickly?

Have a nice day~
Kendall

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--

Hi Saji,

Thanks for the information.

I may not use a static page generator, so webgen is ignored.
For Roda I have other questions:
#1 Does it have an integrated front-end framework such as Vue?
#2 What's the difference between Roda and Sinatra?
#3 Does it support ORM?

Thanks.

···

On Thu, Nov 25, 2021 at 4:35 PM Saji Hameed <saji@u-aizu.ac.jp> wrote:

Hi Kendall,

I recommend you to use Roda, a web framework in ruby to present your
results, if you want a dynamic website -- i.e., one where your viewers can
ask your software to create some customized data analysis or plots on the
fly.

This is usually not needed, because you have probably a collection of
analysis that were made before. In this case, you can just use a ruby
library called
webgen to make a static website.

You can also combine both in a useful way.. In this case, the dynamic site
is used only by you to store some metadata (for example how to organize
the information into various sections, subsections etc.) and also data
(figures, writeup etc). Then, you will pull what you need from the
database (created by the dynamic website), and use a script to transform
those into content that can be used by webgen.

I used this approach here Saji Hameed / motus_natus · GitLab. Here
motus_natus.rb is the central program for my dynamic content management
backend.
The script create_static_site.rb collects data from the backend and
creates necessary files needed for webgen to do its job (in
static_site/src).

Hope this gives you some ideas. This is not a quick way, but your site
may be more sustainable into the future.

saji

On Thu, Nov 25, 2021 at 4:28 PM Kendall Wagner <kendawagner@gmail.com> > wrote:

Dear community,

Since I am a data scientist, most of the time I use R, python, and some
ruby for my jobs.
I have zero experience as a front developer including JS/CSS etc.
If I want to present my result to other people with a simple web
interface, what do you think I can do to get started quickly?

Have a nice day~
Kendall

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Hi Kendall,

1. No. It does not come with anything to help with front-end development.
2. Just the strategy for routing. Because of this, Roda claims to be
considerably faster, giving similar performance as Rack.
3. Yes, you can use Sequel as an ORM

I would suggest using front-end frameworks a bit later, because all of them
will bring in new concepts and it may slow your work down.
If your plots are ready made, it would be just simple to display them using
plain html and javascript. It may help a lot to use
one of the CSS frameworks for helping with your site design.

The static site that we built using this approach is at
http://shortxxvids.com; we try to minimize the use of javascript and
refrain from
too much css as well.

saji

···

On Thu, Nov 25, 2021 at 7:09 PM Kendall Wagner <kendawagner@gmail.com> wrote:

Hi Saji,

Thanks for the information.

I may not use a static page generator, so webgen is ignored.
For Roda I have other questions:
#1 Does it have an integrated front-end framework such as Vue?
#2 What's the difference between Roda and Sinatra?
#3 Does it support ORM?

Thanks.

On Thu, Nov 25, 2021 at 4:35 PM Saji Hameed <saji@u-aizu.ac.jp> wrote:

Hi Kendall,

I recommend you to use Roda, a web framework in ruby to present your
results, if you want a dynamic website -- i.e., one where your viewers can
ask your software to create some customized data analysis or plots on the
fly.

This is usually not needed, because you have probably a collection of
analysis that were made before. In this case, you can just use a ruby
library called
webgen to make a static website.

You can also combine both in a useful way.. In this case, the dynamic
site is used only by you to store some metadata (for example how to organize
the information into various sections, subsections etc.) and also data
(figures, writeup etc). Then, you will pull what you need from the
database (created by the dynamic website), and use a script to transform
those into content that can be used by webgen.

I used this approach here Saji Hameed / motus_natus · GitLab. Here
motus_natus.rb is the central program for my dynamic content management
backend.
The script create_static_site.rb collects data from the backend and
creates necessary files needed for webgen to do its job (in
static_site/src).

Hope this gives you some ideas. This is not a quick way, but your site
may be more sustainable into the future.

saji

On Thu, Nov 25, 2021 at 4:28 PM Kendall Wagner <kendawagner@gmail.com> >> wrote:

Dear community,

Since I am a data scientist, most of the time I use R, python, and some
ruby for my jobs.
I have zero experience as a front developer including JS/CSS etc.
If I want to present my result to other people with a simple web
interface, what do you think I can do to get started quickly?

Have a nice day~
Kendall

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--

While this may not be the most known about solution, I would recommend you to take a look at Opal-Browser. Opal is a Ruby->JS compiler, allowing you to write frontend code in JS. Opal-Browser provides a jQuery like interface to your web application and most browser features (if you are familiar with Nokogiri, you will be at home with the API it provides).

We have an example Roda + Roda-Sprockets + Opal + Opal-Browser stack application:

For other ideas, you can take a look at other examples we have: https://github.com/opal/opal-browser/tree/master/examples

The biggest upside is that you will be able to write both frontend and backend in Ruby, allowing you to share code between those. The downside is that this Gem has not a lot of users, so you may have problems Googling solutions. Other downside is that it's not a full-fledged integration (requiring you to find out how to pass data client-to-server and vice versa) and it's more like jQuery than Vue or React.

To reiterate, using this library will require no knowledge of JS from you, but you will still need to learn more or less about DOM. The Opal community also provides active support channels if you would happen to hit a roadblock.

With Roda-Sprockets you will also be able to easily integrate anything you would choose for CSS (like Sass, Bootstrap, etc.).

···

On 11/25/21 11:08, Kendall Wagner wrote:

Hi Saji,

Thanks for the information.

I may not use a static page generator, so webgen is ignored.
For Roda I have other questions:
#1 Does it have an integrated front-end framework such as Vue?
#2 What's the difference between Roda and Sinatra?
#3 Does it support ORM?

Thanks.

On Thu, Nov 25, 2021 at 4:35 PM Saji Hameed <saji@u-aizu.ac.jp> wrote:

    Hi Kendall,

    I recommend you to use Roda, a web framework in ruby to present
    your results, if you want a dynamic website -- i.e., one where
    your viewers can
    ask your software to create some customized data analysis or plots
    on the fly.

    This is usually not needed, because you have probably a collection
    of analysis that were made before. In this case, you can just use
    a ruby library called
    webgen to make a static website.

    You can also combine both in a useful way.. In this case, the
    dynamic site is used only by you to store some metadata (for
    example how to organize
    the information into various sections, subsections etc.) and also
    data (figures, writeup etc). Then, you will pull what you need
    from the database (created by the dynamic website), and use a
    script to transform those into content that can be used by webgen.

    I used this approach here
    Saji Hameed / motus_natus · GitLab. Here motus_natus.rb is
    the central program for my dynamic content management backend.
    The script create_static_site.rb collects data from the backend
    and creates necessary files needed for webgen to do its job (in
     static_site/src).

    Hope this gives you some ideas. This is not a quick way, but your
    site may be more sustainable into the future.

    saji

    On Thu, Nov 25, 2021 at 4:28 PM Kendall Wagner > <kendawagner@gmail.com> wrote:

        Dear community,

        Since I am a data scientist, most of the time I use R, python,
        and some ruby for my jobs.
        I have zero experience as a front developer including JS/CSS etc.
        If I want to present my result to other people with a simple
        web interface, what do you think I can do to get started quickly?

        Have a nice day~
        Kendall

        Unsubscribe:
        <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
        <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

    --

    Unsubscribe:
    <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
    <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

I meant - in Ruby.

···

On 11/25/21 13:24, hmdne wrote:

allowing you to write frontend code in JS

Great. I hope to use this one in future projects ( i am an amateur, but
this sounds quite attractive to me).

saji

···

On Thu, Nov 25, 2021 at 9:25 PM hmdne <hmdne@airmail.cc> wrote:

While this may not be the most known about solution, I would recommend
you to take a look at Opal-Browser. Opal is a Ruby->JS compiler,
allowing you to write frontend code in JS. Opal-Browser provides a
jQuery like interface to your web application and most browser features
(if you are familiar with Nokogiri, you will be at home with the API it
provides).

We have an example Roda + Roda-Sprockets + Opal + Opal-Browser stack
application:

https://github.com/opal/opal-browser/tree/master/examples/integrations/dynamic-roda-roda-sprockets

For other ideas, you can take a look at other examples we have:
https://github.com/opal/opal-browser/tree/master/examples

The biggest upside is that you will be able to write both frontend and
backend in Ruby, allowing you to share code between those. The downside
is that this Gem has not a lot of users, so you may have problems
Googling solutions. Other downside is that it's not a full-fledged
integration (requiring you to find out how to pass data client-to-server
and vice versa) and it's more like jQuery than Vue or React.

To reiterate, using this library will require no knowledge of JS from
you, but you will still need to learn more or less about DOM. The Opal
community also provides active support channels if you would happen to
hit a roadblock.

With Roda-Sprockets you will also be able to easily integrate anything
you would choose for CSS (like Sass, Bootstrap, etc.).

On 11/25/21 11:08, Kendall Wagner wrote:
> Hi Saji,
>
> Thanks for the information.
>
> I may not use a static page generator, so webgen is ignored.
> For Roda I have other questions:
> #1 Does it have an integrated front-end framework such as Vue?
> #2 What's the difference between Roda and Sinatra?
> #3 Does it support ORM?
>
> Thanks.
>
> On Thu, Nov 25, 2021 at 4:35 PM Saji Hameed <saji@u-aizu.ac.jp> wrote:
>
> Hi Kendall,
>
> I recommend you to use Roda, a web framework in ruby to present
> your results, if you want a dynamic website -- i.e., one where
> your viewers can
> ask your software to create some customized data analysis or plots
> on the fly.
>
> This is usually not needed, because you have probably a collection
> of analysis that were made before. In this case, you can just use
> a ruby library called
> webgen to make a static website.
>
> You can also combine both in a useful way.. In this case, the
> dynamic site is used only by you to store some metadata (for
> example how to organize
> the information into various sections, subsections etc.) and also
> data (figures, writeup etc). Then, you will pull what you need
> from the database (created by the dynamic website), and use a
> script to transform those into content that can be used by webgen.
>
> I used this approach here
> Saji Hameed / motus_natus · GitLab. Here motus_natus.rb is
> the central program for my dynamic content management backend.
> The script create_static_site.rb collects data from the backend
> and creates necessary files needed for webgen to do its job (in
> static_site/src).
>
> Hope this gives you some ideas. This is not a quick way, but your
> site may be more sustainable into the future.
>
> saji
>
>
>
> On Thu, Nov 25, 2021 at 4:28 PM Kendall Wagner > > <kendawagner@gmail.com> wrote:
>
> Dear community,
>
> Since I am a data scientist, most of the time I use R, python,
> and some ruby for my jobs.
> I have zero experience as a front developer including JS/CSS etc.
> If I want to present my result to other people with a simple
> web interface, what do you think I can do to get started quickly?
>
> Have a nice day~
> Kendall
>
> Unsubscribe:
> <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;
>
>
>
> --
>
> Unsubscribe:
> <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;
>
>
> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--

This looks interesting to me too. Thanks

···

On 2021-11-25 22:12, Saji Hameed wrote:

Great. I hope to use this one in future projects ( i am an amateur,
but this sounds quite attractive to me).

saji

On Thu, Nov 25, 2021 at 9:25 PM hmdne <hmdne@airmail.cc> wrote:

While this may not be the most known about solution, I would
recommend
you to take a look at Opal-Browser. Opal is a Ruby->JS compiler,
allowing you to write frontend code in JS. Opal-Browser provides a
jQuery like interface to your web application and most browser
features
(if you are familiar with Nokogiri, you will be at home with the API
it
provides).

We have an example Roda + Roda-Sprockets + Opal + Opal-Browser stack

application:

https://github.com/opal/opal-browser/tree/master/examples/integrations/dynamic-roda-roda-sprockets

For other ideas, you can take a look at other examples we have:
https://github.com/opal/opal-browser/tree/master/examples

The biggest upside is that you will be able to write both frontend
and
backend in Ruby, allowing you to share code between those. The
downside
is that this Gem has not a lot of users, so you may have problems
Googling solutions. Other downside is that it's not a full-fledged
integration (requiring you to find out how to pass data
client-to-server
and vice versa) and it's more like jQuery than Vue or React.

To reiterate, using this library will require no knowledge of JS
from
you, but you will still need to learn more or less about DOM. The
Opal
community also provides active support channels if you would happen
to
hit a roadblock.

With Roda-Sprockets you will also be able to easily integrate
anything
you would choose for CSS (like Sass, Bootstrap, etc.).

On 11/25/21 11:08, Kendall Wagner wrote:

Hi Saji,

Thanks for the information.

I may not use a static page generator, so webgen is ignored.
For Roda I have other questions:
#1 Does it have an integrated front-end framework such as Vue?
#2 What's the difference between Roda and Sinatra?
#3 Does it support ORM?

Thanks.

On Thu, Nov 25, 2021 at 4:35 PM Saji Hameed <saji@u-aizu.ac.jp> >> wrote:

Hi Kendall,

I recommend you to use Roda, a web framework in ruby to

present

your results, if you want a dynamic website -- i.e., one where
your viewers can
ask your software to create some customized data analysis or

plots

on the fly.

This is usually not needed, because you have probably a

collection

of analysis that were made before. In this case, you can just

use

a ruby library called
webgen to make a static website.

You can also combine both in a useful way.. In this case, the
dynamic site is used only by you to store some metadata (for
example how to organize
the information into various sections, subsections etc.) and

also

data (figures, writeup etc). Then, you will pull what you

need

from the database (created by the dynamic website), and use a
script to transform those into content that can be used by

webgen.

I used this approach here
Saji Hameed / motus_natus · GitLab. Here motus_natus.rb

is

the central program for my dynamic content management backend.
The script create_static_site.rb collects data from the

backend

and creates necessary files needed for webgen to do its job

(in

static_site/src).

Hope this gives you some ideas. This is not a quick way, but

your

site may be more sustainable into the future.

saji

On Thu, Nov 25, 2021 at 4:28 PM Kendall Wagner >>> <kendawagner@gmail.com> wrote:

Dear community,

Since I am a data scientist, most of the time I use R,

python,

and some ruby for my jobs.
I have zero experience as a front developer including

JS/CSS etc.

If I want to present my result to other people with a

simple

web interface, what do you think I can do to get started

quickly?

Have a nice day~
Kendall

Unsubscribe:

<mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>

<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--

Unsubscribe:
<mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Unsubscribe:

<mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>

<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Unsubscribe:
<mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

If you are already using R then why not use shiny[1]? Would save you a lot of time developing a homegrown solution.

When you want to use a Ruby solution I would recommend starting with Ruby-on-Rails 7 (currently an alpha version but very usable) adding hotwire and stimulus later for an easy path to making your webapp interactive. Significant learning curve though! But I guess that is true for most web-development tools.

Cheers,
Ivo

[1] https://shiny.rstudio.com/

···

On 25-11-2021 08:28, Kendall Wagner wrote:

Dear community,

Since I am a data scientist, most of the time I use R, python, and some ruby for my jobs.
I have zero experience as a front developer including JS/CSS etc.
If I want to present my result to other people with a simple web interface, what do you think I can do to get started quickly?

Have a nice day~
Kendall

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;