John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

can i create datamodels in local storage?

I will look at it with my programmer... But, to me it seems its geared for websites. Now I do understand were building in html here, however, when we talk about local storage (when I create a local storage item) is that item not saved on the phones internal cache? Not its web browser cookies...

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

can i create datamodels in local storage?

Max, what I would really like to do is create folders of some sort which house its own local storage items.

The other way you can think about think about this is like this: You know how you build a page and all its items can be mapped with requests and responses?

Well, imagine if instead of a page, u have that page act as local storage folder which houses its very own local storage items. This way, you can map from a service response to the local storage folder ((its items) exactly the same way you do now to a page) simultaneously (or not) with just a page, and later have the local storage folder be able to act just like a service response to populate a page.

This is what Im talking about... I dont know if you can do that exactly like i described, but I'd like to know how I can save folders (or blocks) of local storage items inside instead of them being all listed in one single level. I will be looking at several hundred local storage items that i need to call up anytime with many different configurations (meaning that Ill have one service response to populate one very large Folder, but use some of the items at any given time). Its going to be very hard to look at hundreds of local storage items in one level and much easier if I can organize them in folders.

I really like your mapping system very much and I really would like to keep using that system, but It would really make a huge difference to me if you guys can at least allow the user to create local storage folders. And those folders the user can add the items the same way they do now, but inside a folder not just all in one single level. Besides that, the benefit of this folder system is that you can have called a local storage item exactly the same name (i.e. driver_id) in multiple folders, therefore the user doesnt have to worry about making a unique name for every single purpose. When building a larger scale app, this will make the users job far easier to manage the data items coming, staying, and going.

Im working on building a very large mobile app with many features and my programmer and I designed datamodels inside Eclipse (for Android) earlier this year and our server is also designed with these datamodels in mind. We were going to finish our 90% complete Android app, then go back to iOS (about 50% complete) until I found appery.io. Im about done on this small little Truck App that you guys have been helping me on the past 2 weeks and overall we think that we can do our Linked Live (you can say its a monster app - a social network like a FB plus a Foursquare type venue platform plus a dating app plus a rewards system plus an ordering platform for venues plus ... well, the list goes on - all in one) app on your platform.

I figure that we can do a better job on the design aspect plus deploy to all 4 major app phone platforms with Appery in a quicker time frame then complete what we already have in Eclipse and Xcode or in worst case about the same timimg.

In final, i think i explained myself what Im really looking for. I hope i didnt confuse you guys. To me, it doesnt look like the local storage items can be organized in folders at this point unless somehow you can make a page act like a local storage folder. If this is not possible the way I would like it, can you guys quickly add a folder system to your local storage items? And if not anytime soon (meaning in the next 30 days) - what are my options in the next 30 days?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

can i create datamodels in local storage?

[quote:]
me if you guys can at least allow the user to create local storage folders
[/quote]
We don't forbid creating anything you want in local storage. It's important to understand that Appery.io makes building apps simpler and faster on top of standard technologies and APIs. You can use any JavaScript libraries, anything the browser will support.

Local storage is a browser feature -- it's not an Appery.io feature. When you map from service to local storage, all really happens is this method standard method is called:

code
localStorage.setItem(name, value);
/code

If you want to implement a folder feature in local storage -- you can do it.

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

can i create datamodels in local storage?

uhmm, ok. How do i do that? How do I add a folder to place local storage items inside, and also use them to map the same way the local storage items are there now?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

can i create datamodels in local storage?

It's something you would need to implement or find a JavaScript library that does that.. there is no one solution to this.

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

can i create datamodels in local storage?

I dont understand how i can write a JS code to make changes how your User Interface builder works... I realize i can write JS to potentially do this, but how would i be able to write anything to keep the same way Im mapping now... dragging and dropping... This would have to be on your guys end it seems to me.

I just dont see how i can do this without you guys showing me how to do it...??

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

can i create datamodels in local storage?

Sorry, I wasn't clear. You wouldn't be making changes to the user interface and mapping wouldn't be invoked (you could use it how it works today). You would be using JavaScript directly.

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

can i create datamodels in local storage?

that would be nice if you guys could implement that in the very near future since I doubt it would be very hard to do...

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

can i create datamodels in local storage?

ok, so your saying as of today the way your UI builder is - I cant do what I really want...

So, then are you saying when I create a local storage item - that item can act like a folder that houses multiple local storage items inside? Im guessing thats what your really saying. In that case, does it mean I can map multiple items there? In which case thats where a JS code comes in play to store them in a list. And later retrieve them by filtering through inside.. If this is correct, can you please give me an example JS code with a simple 2 items inside, the code how to store the two items, and the code how to filter through those two to grab one in particular?

Thanks again.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

can i create datamodels in local storage?

You can do anything you want with local storage -- it's not an Appery.io feature. It's available in all browsers (desktop/mobile). Simply use this API directly: https://developer.mozilla.org/en-US/d...

The basic API allows you to save a value:
localStorage.setItem(name, value);

and get a value:
localStorage.getItem(name);

on top of this, you can build any model you want.

When you map to/from local storage in Appery.io -- the two methods above are used. That's it.

Please search online for local storage examples, filtering, etc -- there are hundreds of examples out there.

Return to “Issues”