Bible/text browser programming

117 views
Skip to first unread message

charlesfra...@gmail.com

unread,
May 3, 2018, 1:36:07 PM5/3/18
to Open Scriptures
I want to write a Bible browser app for mobiles. I have experience programming in perl and python. The unique thing about a Bible browser is the size of the text being displayed. One solution id to only load one book at a time, but this would prevent smooth scrolling between books. How do people normally handle the problem?

Kahunapule Michael Johnson

unread,
May 3, 2018, 1:47:14 PM5/3/18
to openscr...@googlegroups.com
On 05/03/2018 07:36 AM, charlesfra...@gmail.com wrote:
I want to write a Bible browser app for mobiles. I have experience programming in perl and python. The unique thing about a Bible browser is the size of the text being displayed. One solution id to only load one book at a time, but this would prevent smooth scrolling between books. How do people normally handle the problem?

One solution is to just load one chapter at a time, but preload the next and previous chapter as well, in the background, so that by the time someone scrolls to the bottom of the current chapter, the next one is already loaded. If you have room to load a whole book at a time, then this isn't a problem, really...

--

Aloha,
Michael Johnson

PO BOX 881143 • PUKALANI HI 96788-1143
• USA
mljohnson.org • Phone: +1 808-333-6921 • Skype: kahunapule

Aaron Laws

unread,
May 3, 2018, 4:14:07 PM5/3/18
to openscr...@googlegroups.com
On Thu, May 3, 2018 at 1:36 PM, <charlesfra...@gmail.com> wrote:
...but this would prevent smooth scrolling between books....

I don't think anyone would mind having to touch a button to get to the next book. Thanks!

John Dyer

unread,
May 3, 2018, 4:20:30 PM5/3/18
to openscr...@googlegroups.com
Charles,
Biblewebapp.com does something like what Michael describes where it loads the requested chapter and then also preloads the previous and next chapters. The main problem I ran into is that I originally allowed it to do the preload while the user was scrolling, but this often resulted in a  jumpy experience. So now it waits until scrolling has stopped to do preloading and pruning unneeded chapters. 

The code is open source so feel free to reuse anything you find. 

JD

On Thu, May 3, 2018 at 12:36 PM <charlesfra...@gmail.com> wrote:
I want to write a Bible browser app for mobiles. I have experience programming in perl and python. The unique thing about a Bible browser is the size of the text being displayed. One solution id to only load one book at a time, but this would prevent smooth scrolling between books. How do people normally handle the problem?

--
You received this message because you are subscribed to the Google Groups "Open Scriptures" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openscripture...@googlegroups.com.
To post to this group, send email to openscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/openscriptures.
For more options, visit https://groups.google.com/d/optout.
--
John Dyer - http://j.hn/

Ben Dwyer

unread,
Aug 31, 2018, 8:33:28 AM8/31/18
to Open Scriptures

The way I do it on javascripture.org is to load the chapter before and after, outside the window. Then when the user scrolls close to the edge of the window, we load in the next/previous chapter. The hard thing is, when loading in the previous chapter, the scroll position jumps, so maintaining that is where the magic happens.
Reply all
Reply to author
Forward
0 new messages