Caching data and images in wp7 - windows-phone-7

I searched on google for how to do data(xml) and image caching on windows phone 7, but did not find any luck. Please direct me to the right place from where I can read about caching mechanism in wp7. (FYI : I use HttpWebRequest to make request to the server and receive response as xml).
Thanks in advance!

You might want to check the WP7Contrib - it provides pattern and implementations for caching transient data on WP7. It might give you some ideas on how you can achieve what you want.
I am a contributor to this OSS project and this is not a case of self publication honest :)

I know this is an old post, but I found this great class which others might find useful to know about:
Kawagoe Toolkit - PersistentImageCache

you could use the Isolated Storage to cache both your data & images.
Essentially, you could write key-value pairs or entire files (using byte stream) into the sand-boxed Isolated Storage.
See if the two links below help:
31 Days of Windows Phone | Day #15: Isolated Storage
Silverlight 2 - Saving and Retrieving Images from IsolatedStorage

There is also a really great auto request and caching framework that came out not too long ago. Its called AgFx and its available on codeplex and nuget I believe. I'm on my phone now or else I'd provide links.
Anyways, I've heard AgFx rocks, but personally i haven't worked with enough to personally offer comments. Hope that helps.

For caching images you can use JetImageLoader, I created it for application, where we need to load, cache and show big amount of logos, icons and so on.
It can be used as binding converter, so you should not even change your code! Just update your XAMLs!
Please, check out samples in repository, you'll love it ;)
Features:
Caching on disk
Caching in memory
Fully asynchronous
Available as binding converter or programmatically from your code
Fully open source, fork and improve it!
Here is the example:
<Image Source="{Binding ImageUrl, Converter={StaticResource MyAppJetImageLoaderConverter}}"/>
P.S. I am sorry, that I copying my answer from another questions, but image caching on windows phone is huge problem and I want to share my solution, so everybody can use it and improve for developers community

Related

Programmatic access of SkyDrive

Does anyone know how to access SkyDrive programmatically from Windows Phone 7? What API do I use? I need to upload files from the Phone to SkyDrive and vice versa.
Some code samples would be great. :-)
You can now officially integrate parts of SkyDrive with Windows Phone 7 applications.
Details outlined here.
There is a new Live SDK available from Microsoft which I think can do this. It's also in a very early alpha or beta state:
http://msdn.microsoft.com/en-us/library/bb264574.aspx
I have developed a sample based on SkyPad (Developer Preview). Please install the Windows Live Developer preview SDK.
The sample allows to save a file to SkyDrive and dowload it again after saving.
Here the link:
http://blog.mecum.biz/2011/10/windows-phone-7-mango-skydrive-sample/
You can use the Live SDK to integrate SkyDrive into your Windows Phone applications. Please see our code samples on GitHub.
Not an answer, but there's hope that an answer is on the way:
However, when Mike Torres was asked about features such as better usability, third-party API support, Windows Live Mesh integration, and expandable storage, he acknowledged that these are "top asks" for SkyDrive and said that they are currently "hard at work on SkyDrive as we speak"
Source
Your requirements sound pretty much like mine - you just want to use skydrive as a basic cloud filesystem.
I thought Matt's suggestion was an outstanding idea. I obtained the library and set out to port it, but unfortunately the codebase is huge and elaborate and absolutely riddled with the [Serializable] attribute which is not compatible with WP7. It also makes extensive use of several pieces of framework not available in WP7x, including X509Chain and Authorization.
SkyDriveApi is not even compatible with VS2010 - an attempted conversion produced a big mess so I just tried it out in VS2008.
We could always write one. This looks like a fair bit of work so I invite you to collaborate.
Well, it's feature complete and working a treat. I'd like to thank people for all the support and assistance I received reverse engineering the protocol using Fiddler, and coding, testing and debugging the prototype into production ready code. I'd like to, but nobody contributed a damn thing. Good luck writing your own.
SkyDrive doesn't have an official API but here are some unofficial ones. I'd start by looking at http://skydriveapiclient.codeplex.com/.
It doesn't claim support for WP7 but you may be able to port it.

most appropriate decision for dynamic web content

First of all, I'm sorry because of this lame question. But I'm kind of lost in all dynamic-html, ajax, etc stuff. So i decided get help from the pros.
Basically what I'm trying to do is creating a web page which have dynamic content(messages) coming from a web server(asp.net or php) presented in floating(movable by viewer) boxes in the page. And those boxes will be created dynamically upon a trigger from the server. And the viewer should be able to draw lines between those boxes to connect them(this information will also be sent/received to/from the server). Now which technologies should i use to have this? Is a combination of ajax+html5+jscript enough for this? Or do i need libraries like Yahoo's YUI, Google's GWT, etc.? Or, is flash/silverlight the best solution? Or something else?
Thanks
I'm no pro but I'd go for the HTML+JS+CSS version. As for the libraries, they'll help you in getting your content accross the many browsers and provide you with some nice utilities ;)
You don't need frameworks to do any of this. They might make the job easier, but, ultimately, they'll produce HTML and Javascript that make use of AJAX to get the job done.
Sounds like a big job, so be sure consider appropriate server-side and Javascript frameworks, and good luck.
You first have to decide between HTML5/JS/CSS, Flash and Silverlight for your client technology. Consider the client machines you need to support (Windows, Mac, Linux, iPad etc.)
You then pick your server-side language/platform. AJAX is your communication medium.
If you're going with HTML5/JS/CSS you'd like to pick a JS framework to speed up development. jQuery makes for quick coding. Other frameworks may have more features but are more abstracted from plain JS. You might want to use GWT if you're more familiar with Java than Javascript.

What Software Do You Use To Create Sitemaps / Site Structure For Large Sites?

Just wondering what software you use to create a visual sitemap / site structure representation before you start big sites?
I am looking to map out a large site, but cannot find any good software to help me map the site visually (And in pages/categories)..
Maybe SketchFlow http://electricbeach.org/?p=145 ? which is included in the Expression Blend Trial http://www.microsoft.com/downloads/details.aspx?FamilyID=92E1DB7A-5D36-449B-8C6B-D25F078F3609&displaylang=en
I strongly suggest taking a look at this tool: http://www.balsamiq.com/products/mockups
The Balsamiq tool is the best for doing mockups (i assume this is what you are referring too when talking about sitemaps before you start...). With this software you can quickly generate a working wireframe of what ever you are creating. So much functionality that you can actually share it with your client to get some good sign offs prior to typing the first bit of code.
Very powerful!
And the other one...just shown at the last MIX09 is SketchFlow. Couldn't remember it to save my life. This is a WAY COOL tool for site maps and UI mock up. I was trying to find you the actual MIX presentation as it is super cool to watch. But here are some YouTube videos of that presentation from a user perspective I guess.
http://www.youtube.com/watch?v=zsAZjb7FKXA
http://www.youtube.com/watch?v=f3ErrS68YMM
Check it out!
update...found the SketchFlow video!!! http://videos.visitmix.com/MIX09/C01F
Great keynote from there too: http://videos.visitmix.com/MIX09/KEY01
I know this is an old question, but for others who find this via search, I personally love mocking my websites up with mind mapping tools. I've tried several but my favorite was MindNode for Mac and Xmind for Windows.
XMind free download:
http://www.xmind.net/
MindNode free download:
https://mindnode.com/
I've also tried MindMeister which works just as well as other mind mapping tools and is hosted for you so you can access your mind maps anywhere. However, MindMeister only allows you three maps (currently) without upgrading to a paid subscription.
Another that I've worked with is mockflow.com which is great for mocking up websites with all their features and buttons and even making clickable navigation. They have a free version, but again it's very limited without upgrading to a paid version.
I'm using Slickplan. This cloud based app allows me to have access to my projects from different machines regardless of their operating systems. All I need is one of the leading web browsers (Chrome, Firefox, Safari).
With Slickplan you can create visual sitemaps from scratch or you can use Site Crawler to import your existing website to visualize and reorganize its structure.
Of course you can always export your projects to the XML format, and use the exported file to create pages and menu systems inside some popular content management system - Slickplan provides plugins for WordPress, Joomla, concrete5 and a few more.

More examples of Prism (Composite Application Library) Applications?

The examples that Microsoft's Patterns and Practices provides are quite helpful:
about a half-dozen simpler QuickStarts which touch on specific issues
the StockTrader reference implementation, which is a fairly rounded application
but it lacks a more useful base application that reads and writes to a data source (XML or database), allowing users to login, edit data, logout, etc. (something like what ASP.NET MVC comes with).
Since Prism applications can get quite complex and lengthy (the StockTrader example is almost 300 files without tests), it would be helpful to have an application that takes care of the CRUD bulk that everyone needs to build for most apps anyway.
Does anyone know of any data-editing Prism example apps out there?
Here (http://petedoesstuff.net/Blog/?p=79) you'll find a bunch of links to the samples of using the Prism.
Particularly, LateNight (http://code.google.com/p/cwpfsamples/) may be what you need. It has login screen and data editing functions.
Its feedback I've seen a lot of. I'll pass this onto the Team and see if we can get some more examples put online around this space.
I'm currently writing my own demo app now, so i'll also try and put that online via my blog.
Scott Barnes - Rich Platforms Product Manager - Microsoft.
The reason data access was left out of the Prism RI is because it is largely irrelevant to Prism. I would think you're better off looking at something like DinnerNow for those kind of things.

Image Uploading with Classic ASP

Hey I was wondering if there were any way to upload images in ASP? I am working on my school's server and I don't really know what is installed and what isn't I Googled a little and came up with "Persits.Upload.1" I tried to instantiate the object with this line:
Set Upload = Server.CreateObject("Persits.Upload.1")
It gave me this error,
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
Am I to assume the component is not installed on the server and/or what should I do for uploading images?
Thanks
Sounds like it couldn't load the class, my ASP very rusty though.
That component is a commercial one, so unless someone has paid for it, you probably don't have it installed.
I have used free asp upload http://www.freeaspupload.net/ a few times, although it was a while a go, that might be a reasonably easy option for you.
File upload is a built in part of html and you can process it in asp without any custom compents. Here is some more information:
https://web.archive.org/web/20180312071127/http://www.4guysfromrolla.com:80/webtech/LearnMore/Upload.asp
This is part of the ASPJpeg library, which needs to be purchased (From Persits.com).
I have used this library to upload multiple items in the past.
To upload a single file you can use the <INPUT type=file name=filename>. This is just HTML though, but should work in all browsers
If it's for educational purposes it may be worth droping Persits an email to see if they will give you a free license.
They offer a 30-day free trial on their site.
Good luck
Will Rickards' link is good. You will also need permissions for the IUSR to create files in whatever directory you are uploading too.
IIS (6 I think?) comes with a limit of 200K for uploading files. Only the server admin can change it to allow more.
If you can get your schools server to install COM objects, there are a number of free uploading tools that make things very easy.
I have older classic ASP apps that use the Persits Software AspUpload component. It works great if you need to resize images, get image dimensions, etc., during the upload process.
It is a component you need to purchase and it needs to be installed on the Web server in order for it to work. It is not a core part of ASP.
by the way, you have a typo in your code, is
Server.CreateObject("Persist.Upload.1")
and not
Server.CreateObject("Persits.Upload.1")
I bet that if you correct this, the code will go smooth :D

Resources