Hi Virender,
We're interested in an offline collection sheet entry prototype using
HTML5.
Eric Schultz is another Mifos contributor that is interested in working
with you on an offline collection sheet entry prototype. Here's some
example code he's written:
https://mifos.dev.java.net/files/documents/5045/150354/offline.tgz
And Eric's comments on same:
> Attached is my example Ruby on Rails site illustrating how offline
> support can be used for Firefox. Here are a few notes:
>
>
> - To see the page, go to localhost:3000/people . This should show you
> a list of "names" saved into the database. A good way of understanding
> what offline support provides is to go through the following process:
> - After going to this page, make sure to tell Firefox you want this
> site to save information on your computer. After doing so, reload the
> page; all the names should be saved locally as well as on the server.
> - Turn offline mode on (File -> Work Offline). This simulates the
> experience of not having connectivity.
> - Reload the page, all the names should reload (but not in order,
> something that would be fixed for the project).
> - Add a new name using the form. The name should be added to the
> list. Note this is being done while working offline.
> - Turn offline mode off and then reload the page.
> - All the names should be there except for the one you just entered
> which hasn't been synced with the server.
> - Sync the name you added offline to the server. The name should be
> added to the list.
> - Reload the page. All the names should be there including the one
> you just synced.
>
>
> -Here's what's not great about this sample mainly due to the short
> time I had to do this (all of these can be fixed easily enough, I just
> didn't have the time):
> - Syncing doesn't happen immediately when you go back online. (An
> event callback for going online or when reloading the page after
> you've been offline could do this automatically)
> - The names are saved locally in a more or less random order due to
> the way localStorage is implemented. (Providing an field in the person
> objects saved locally for an order position could be used for saving
> order)
> - If you're offline, add a name, go back online and then sync
> without doing a reload the name will be displayed in the list twice.
> (Putting in an if statement to catch this situation to prevent double
> display would be a fix)
> - The temporary name for the id of a person object created offline
> wouldn't work if you created two people who had the same name. (Maybe
> use some form of hashing of the name and time created could be used to
> get around this. It's something I need to think about more.)
> - The code could be cleaner and done in a way that keeps the
> functions out of the global scope but for this sample, its not an
> issue. How that would be structured would need to be thought out more.
> - The code obviously should be in a separate javascript file but
> with the way Rails does authentication of form submissions, it was
> just more practical to do it like this.
> - onLoad() is just being called at the end of the html, not via a
> callback which would be a cleaner way of doing this I think.
> - It's not very pretty. :)
>
>
> - The Javascript is in the app/views/people/index.html.erb and the
> functions are documented.
> - I've tested this in Firefox 3.6 but I think it should work in 3.5 as
> well.
> - The list of all the items in the local cache displays in the Firebug
> console if you want to look at it.
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Hi Eric, I want to discuss in detail about the use case, possible
technologies and pros and cons of different technologies for this
module, and come up with our proposal. Currently I can visualize two
possible implementations for offline Collection Sheet Entry:
1. Using Offline web application support of HTML5: The user would use
the application (when offline) to enter Collection Sheet Entry data.
After an initial look on the use case on test server, I think in the
prototype we will have to also prove out how to provide contextual
drop downs for Branch Office, Loan Office and Center.
2. Providing xls sheet upload in the web application: The user could
upload an xls sheet through the web application, which will validate
the data and provide pages to correct the data if invalid and review
the data before submission. Although option 1 seems to be more user
friendly, one advantage I see using xls sheet upload is that
Collection Sheet Entry data can be uploaded in bulk. Currently using
web application, at a time we can enter data only for a particular
combination of branch, loan officer and center.
We can possibly think of providing only one of the above support or
both kinds of support in the application.
I would prefer IRC chat room discussion. Please let me know a time
when we can discuss in detail in the chat room. I am available after
7.00 PM till 1.00 AM PST on weekdays and almost through out the day on
weekends.
Thanks,
Virender
On May 25, 8:46 am, Ed Cable <edca...@gmail.com> wrote:
> Angshu,
>
> This is a very good point. Many of our customers are using IE as their
> browser and Windows as their OS so whatever offline solution we develop it
> must be compliant with their needs.
>
> These stats are rough but according to SourceForge, 78% of our downloads in
> 2010 came from Windows users.
>
> >From our web traffice for 2009 - nearly 45% of visitors came through IE
>
> browser (with the majority of those being on IE7.
>
> Ed
>
> On Tue, May 25, 2010 at 7:30 AM, Angshuman Sarkar
> <angs...@thoughtworks.com>wrote:
>
>
>
> > Does IE support HTML5?
> > AFAIK, IE8 doesnt support all aspects of HTML5. Also whether HTML5 code
> > reliant on IE will run on other browsers is questionable.
> > regards
> > ~angshu
>
> > On Tue, May 25, 2010 at 6:52 PM, Adam Monsen <hair...@gmail.com> wrote:
>
> >> > 1. Prototype: This is to technically prove out the offline
> >> > functionality using HTML5.
>
> >> The business need is to show that the following can be done:
> >> * entering collection sheet data offline
> >> * syncing that data into Mifos when internet connectivity resumes
>
> >> HTML5 is a suggestion. If it's easier to enter data in a spreadsheet
> >> program like OpenOffice.org Calc or Microsoft Excel, you and Eric
> >> Schultz might make a case for that. People who actually deploy and use
> >> Mifos can (and should) also pipe up in this thread with suggestions on
> >> how they'd like the feature to work.
>
> >>http://www.mifos.org/developers/wiki/OfflineCollectionSheetEntryProto...
> >> mentions a Firefox plugin and XML--this should be changed to reflect
> >> whatever technology feels right. In general, we use Java Web-based
> >> technologies, which is why we are considering HTML5. The code must of
> >> course also be maintainable and follow our coding standards.
>
> >> Eric's code proves HTML5 on the client side. Much more work is
> >> required to implement code in Mifos (or in a plugin / separate module)
> >> that can accept and sync collection sheet data created while offline.
>
> >> I'm not going to be able to provide hands-on mentoring for this
> >> project. Others may be able to help--but I'm hoping you'll be able to
> >> work more closely with Eric.
>
> >> The OfflineCollectionSheetEntryPrototype wiki page is a good place to
> >> continue to refine requirements.
>
> >> --------------------------------------------------------------------------- ---
>
> > --------------------------------------------------------------------------- ---
>
>
>
> --------------------------------------------------------------------------- ---
>
> --
> You received this message because you are subscribed to the Google Groups "Mifos Developer" group.
> To post to this group, send email to mifosde...@googlegroups.com.
> To unsubscribe from this group, send email to mifosdevelope...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/mifosdeveloper?hl=en.
------------------------------------------------------------------------------
Based on the discussions on thread "Points for functional use of
mifos", I can visualize these different use cases in Collection Sheet
Entry use case:
1.Field Operator collects data from field using text sheets and then
goes to a
a) branch having electricity but not internet (Here the data is
transferred from text sheets to xls sheet. The data in xls sheet is
passed to a nearby branch having electricity and internet through pen
drive and/or cds)
b) branch having electricity and internet
2.Field Operator collects data from field using a laptop/desktop
a) Has internet connectivity during field operation
b) Does not have internet connectivity during field operation
3.Field Operator collects data from field using a mobile phone
a) Has only mobile connectivity during field operation
b) Has both mobile and internet connectivity during field operation
Talking only of 1 and 2 cases, 1 seems to be a practical use case and
2 an impractical one. I cant visualize a MFI rich enough to provide a
laptop to a field operator for collection purpose and a desktop does
not seem to be practical either.
I am not considering 3 case, which will take the discussion in an
altogether different path of providing another channel for the mifos
application. And should be considered separately.
The mechanisms for alternate (offline) collection sheet entry that I
can see are:
1. Using xls sheet to fill in the data and provide xls sheet upload
functionality in mifos web application
2. Provide HTML5 offline web application support in mifos web
application
I believe the xls sheet mechanism would be better because it will be
able to provide support for 1 a use case. HTML5 offline web app
support will not be helpful for 1 a use case. For 1 b the web
interface would suffice. Also using the xls sheet mechanism we can
upload the collection sheet data in bulk i.e. having different
combinations of branch, loan officer and center.
>From a code perspective we can use provide xls sheet upload field on
the "Bulk entry - Select Center" page. The user could either use xls
sheet upload mechanism or use the form to fill in the data. If xls
sheet is uploaded, we can show a page with errors to rectify if there
are errors in the data in xls sheet or the "preview and submit" page
if there is no error. We will have to add the code to parse xls sheet
using (Apache POI) but I believe we can reuse to a large extent the
code base for the currently implemented use case.
On the thread "Points for functional use of mifos" the support for xls
sheet is being requested by a client of ours not simply for this use
case but for others as well. I am not sure if this support is good for
all the use cases or not. But we can always implement on similar lines
for other use cases as well.
Please let me know your views.
Thanks,
Virender
On May 27, 1:26 am, virender <virendersin...@gmail.com> wrote:
> Thanks Adam for your guidance.
>
> Hi Eric, I want to discuss in detail about the use case, possible
> technologies and pros and cons of different technologies for this
> module, and come up with our proposal. Currently I can visualize two
> possible implementations forofflineCollectionSheetEntry:
>
> 1. UsingOfflineweb application support of HTML5: The user would use
> the application (whenoffline) to enterCollectionSheetEntrydata.
> After an initial look on the use case on test server, I think in the
> prototype we will have to also prove out how to provide contextual
> drop downs for Branch Office, Loan Office and Center.
>
> 2. Providing xls sheet upload in the web application: The user could
> upload an xls sheet through the web application, which will validate
> thedataand provide pages to correct thedataif invalid and review
> thedatabefore submission. Although option 1 seems to be more user
> friendly, one advantage I see using xls sheet upload is thatCollectionSheetEntrydatacan be uploaded in bulk. Currently using
> web application, at a time we can enterdataonly for a particular
> combination of branch, loan officer and center.
>
> We can possibly think of providing only one of the above support or
> both kinds of support in the application.
>
> I would prefer IRC chat room discussion. Please let me know a time
> when we can discuss in detail in the chat room. I am available after
> 7.00 PM till 1.00 AM PST on weekdays and almost through out the day on
> weekends.
>
> Thanks,
> Virender
>
> On May 25, 8:46 am, Ed Cable <edca...@gmail.com> wrote:
>
>
>
>
>
> > Angshu,
>
> > This is a very good point. Many of our customers are using IE as their
> > browser and Windows as their OS so whateverofflinesolution we develop it
> > must be compliant with their needs.
>
> > These stats are rough but according to SourceForge, 78% of our downloads in
> > 2010 came from Windows users.
>
> > >From our web traffice for 2009 - nearly 45% of visitors came through IE
>
> > browser (with the majority of those being on IE7.
>
> > Ed
>
> > On Tue, May 25, 2010 at 7:30 AM, Angshuman Sarkar
> > <angs...@thoughtworks.com>wrote:
>
> > > Does IE support HTML5?
> > > AFAIK, IE8 doesnt support all aspects of HTML5. Also whether HTML5 code
> > > reliant on IE will run on other browsers is questionable.
> > > regards
> > > ~angshu
>
> > > On Tue, May 25, 2010 at 6:52 PM, Adam Monsen <hair...@gmail.com> wrote:
>
> > >> > 1. Prototype: This is to technically prove out theoffline
> > >> > functionality using HTML5.
>
> > >> The business need is to show that the following can be done:
> > >> * enteringcollectionsheetdataoffline
> > >> * syncing thatdatainto Mifos when internet connectivity resumes
>
> > >> HTML5 is a suggestion. If it's easier to enterdatain a spreadsheet
------------------------------------------------------------------------------
I think scenario 2 is very much out of picture and scenario 3 is not
in scope. Here is my thoughts on scenario 1.
> 1.Field Operator collects data from field using text sheets and then
> goes to a
> a) branch having electricity but not internet (Here the data is
> transferred from text sheets to xls sheet. The data in xls sheet is
> passed to a nearby branch having electricity and internet through pen
> drive and/or cds)
> b) branch having electricity and internet
I think this is possible using anyone out of HTML5 and XLS.
HOW?
HTML5 : Stand alone desktop application like CollectionSheet forms
- Stores data locally when offline
- Sync/Upload the local data to remote service (Mifos Server) when online.
- Stored state can be exported in xml format and can be used at
online branch which would have same stand alone form allowing to
import those xml data and then sync/upload that to server.
- Forms will upgrade themselves on upgrade of Mifos on Server.
First thing would be creating Service at Mifos server side, may be
REST/JSON or a Service listening (using Mifos API as other plugins) to
handle calls of HTML5 forms.
XLS: Import/Export interface
- Export, download Collectionsheet as xls, could be created using a
report engine or using Apache POI
- Import, upload Collectionsheet and transaction gets imported as
other plugins
- There xls should have maintain versions as of plugin API
In both the cases most important thing is handling calls at server (plugin API),
You may want to start with finding out "what need to be done" for
extending API to support Collectionsheet import export in any of these
two scenario.
We should keep the approach as generic as possible also.
- Less code in core Mifos
- Add as much as good things you want to add in plugin service to handle things
- Less overhead to setup things (or upgrade)
You can start with
Bottom-to-top i.e. create prototype and create APIs as needed
or
Top-to-Bottom i.e. design API first and the create the prototype
git://mifos.git.sourceforge.net/gitroot/mifos/plugins
http://www.mifos.org/developers/wiki/PluginManagement
Cheers,
Udai
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo