Welcome Guest, Not a member yet? Register   Sign In
A CRM database online/offline
#1

[eluser]Boris Strahija[/eluser]
I need to build a really simple CRM with a really simple search engine Smile This is no problem to do in CI, but it also has to work offline. I think it's going to bi distributed on CD-s or USB sticks.
I still don't have all the details, but what I would like to know is what would be the best way to do something like this. Maybe these a possibility to run CI like this? Or do you have any suggestions?
Thank you
#2

[eluser]KingSkippus[/eluser]
Wow, there's not really an easy way to do what you're asking to do. In order to run anything offline as you're describing, you almost have to have it wrapped in a self-contained application. For a web-based application, this means that you would probably have to include a copy of a web server app on the CD or USB drive, launch it, and have it running before trying to access it.

I can think of two options offhand, neither of which would be particularly easy. First would be to have a web-based application that has some sort of read-only database api built into it as well as the human-friendly front end. If you want an example of this, check out the MediaWiki API, which allows programmatic access to its database in addition to the standard Wikipedia-style human interface. Then have a client-based application that could access the API and cache the results locally for offline access.

Alternatively, you could possibly use some of HTML 5's local storage capabilities. To be honest, I've done practically zero HTML 5 development, so I'd be totally out of my element in offering advice on that front, and really don't even know if it could suit your needs.
#3

[eluser]Boris Strahija[/eluser]
Thanx for the info. I completely forgot about HTML 5 local storage. This could be a solution, but I think it doesn't work in IE at all. So that's a big obstacle since most of the clients would probably have IE as the default browser.

I just had an idea to maybe dump the database in a JSON format, and do the search via JQuery/Ajax. I think this could be a good solution.
#4

[eluser]KingSkippus[/eluser]
Keep in mind, though, that unless you're running a web server on the local machine, you're not going to be able to do that. As far as I know, AJAX won't work with your local filesystem, as javascript is sandboxed from accessing your local files to avoid a huge security risk.

About the only other thing I can think of is to have some sort of interface to generate a static HTML dump of what you want available offline and allow the user to save it to disk. Then they could create an offline copy, or you could at will and store it on a CD and/or USB drive.
#5

[eluser]Boris Strahija[/eluser]
I just tried it in a quick example and it works. Everything is fine in Safari and Firefox. Still have to try IE tomorrow since I don't have a PC around.
The file was opened in the browser simply by double-clicking the html file.


Here's my code if anybody is interested:

index.html
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
&lt;html &gt;
&lt;head&gt;
    &lt;meta http-equiv="Content-type" content="text/html; charset=utf-8" /&gt;
    &lt;title&gt;JQuery local AJAX test&lt;/title&gt;
    [removed][removed]
&lt;/head&gt;
&lt;body&gt;
<h1>JQuery local AJAX test</h1>
<div id="oppenheimer"><p>The test...</p></div>
<button type="button">Load me</button>

[removed]
//&lt;![CDATA[
$(function() {
    $("button").click(function() {
        $.ajax({
             type:         "POST"
            ,url:         "json.js"
            ,data:         {
                "test": 666
            }
            ,dataType:     "json"
            ,success:     function(data) {
                $("#oppenheimer").html("<ul></ul>");
                $(data.people).each(function() {
                    
                    $("#oppenheimer ul").append("<li>"+this.first_name+" "+this.last_name+"</li>");
                });
            }
            ,error:     function(data) {
                alert("Error!");
            }
        });
    });
});
//]]>
[removed]


&lt;/body&gt;
&lt;/html&gt;

json.js
Code:
{
    "people": [
        {
             "first_name":     "John"
            ,"last_name":     "Doe"
        }
        ,{
             "first_name":     "Mark"
            ,"last_name":     "Doe"
        }
        ,{
             "first_name":     "Jane"
            ,"last_name":     "Doe"
        }
        ,{
             "first_name":     "Ted"
            ,"last_name":     "Doe"
        }
    ]
}
#6

[eluser]Unknown[/eluser]
Hello Everyone from intraSquad CRM.

We are Los Angeles based web dev company specialized in Codeigniter and Customer Relationship Management. Recently we launched a beta release of CRM called intraSquad CRM and soon there will be official full release for clients. If interested Please, call sales team for further sales inquiries.


Thanks and Regards,
intraSquad Team
Sales/info: 323-363-7742




Theme © iAndrew 2016 - Forum software by © MyBB