Zend Framework and clients User Agent - zend-framework

I've created an application with the Zend Framework. Now I was asked to make an iphone webapp for it.
So my solution is to get the useragent and render a different view for it.
My searches on google lead to Zend_UserAgent but my library says it doesn't contain it. ;)
Is there any Zend way to find the useragent to render a different view or should I do it another way?
Thanks in advance!

You can use $_SERVER['HTTP_USER_AGENT'] to determine which view to show. Here's a list of all available user agents.

Related

Porting UiBinder file in GWT for mobile

I developed GWT desktop browser application , before working on porting the Application for webkit browsers I need to have following doubts clarified:
Is it possible to map mulitple UiBinder template with the same View class?
Are the widgets consistent in look and feel for Desktop as well as webkit(mobile) browsers?
Thanking in advance.
Take a look at the mobilewebapp example which comes with the GWT SDK. There you can see, how an app can serve different views depending on the device by using deferred binding.
Using the first approach, you have different views for each device. So, you are free to choose different widgets for different platforms.
I want to share one the method that I tried, First of all instead of mapping view to viewimpl you can bind it to viewprovider, and then based on user-agent values you can return the appropriate instance to bind to.I implemented this in sample application and its working fine as of now.

Best framework for embedding HTML pages in an iphone app?

I am developing an app which has a significant 'reference' section in it. It's information that is very applicable to being created as a set of HTML pages, linking to each other.
I am wondering if anyone knows of a good framework out there to embed HTML pages within an iphone app, to be able to open a specific page by key and any other niceties. The best I've seen so far is CMHTMLView on github.
I know I can load HTML pages directly into a UIWebView, I'm looking to see if there's a framework which does a bit of the boilerplate for for me (e.g. checking for existance of files, be able to cache pages by a keyword, any other niceties like being able to index and search pages). Thanks!
To display easy to navigate HTML in a mobile, I use http://jquerymobile.com

jQTouch and Zend Framework

Anyone using Zend Framework to power their jQTouch iPhone Web app? Looks like jQTouch prefers to have all the "pages" on in one html output.
Anyway, I was just curious if anyone was doing that and was willing to share the skeleton of their project.
Thanks,
John
There are not a lot of possibilities here. If you want to have all your output in one view you should perhaps try to use action helpers, all action helper could generate a page and send its output to the response. Take a look at matthew weierophinney's article: http://weierophinney.net/matthew/archives/246-Using-Action-Helpers-To-Implement-Re-Usable-Widgets.html
Another possibility would be to take a look at jquery mobile instead of jqTouch.

MVC Convention over Configuration

I'm building a .NET MVC application. This is mobile web and i cannot use jQuery.
In my application every process is a 3 step action witch leads me to a 3 aspx per process.
My processes can be categorized so i'd like to code my controllers like: ProcessTypeAController, ProcessTypeBController.
My Views should be like: \ProcessTypeA\Process1\1.aspx, \Views\ProcessTypeA\Process1\2.aspx and \Views\ProcessTypeA\Process1\3.aspx.
By convention this not work because the Controllers dont have the same "location" than Views.
Please Help in this question!
Thank U ALL.
You could specify the location of a view:
return View("~/Views/ProcessTypeA/Process1/1.aspx");
As an alternative you could write a custom view engine in order to modify the default view location conventions. Scott Hanselman wrote an excellent blog post about how this could be achieved.

How to Choose which Xcode Template to Use?

what if i have ecommerce application?
like i have
1)sale page
2)list of product page(grid view and list view)
3)detail of product
4) zoom images for that product.
what kind of template should i use?
i refer this post but its not clear.
New iPhone App - How to Choose which Xcode Template to Use?
Thanks
If you have a hierarchy of views in which you go from general to specific information, then you want the navigation template.
However, most of the time, the templates are just starting points for learning. In most cases, you will have an app that is a combination so you start with the generic windows-based template and then flesh it out yourself.
If there is a similar application on the AppStore you may like to see how they have approached it, generally there is something similar that can help you clarify how you would like your application to function.
From the sounds of your application idea you would probably be best served by the Navigation template. But after all it is only a template, you can completely change the structure of the application later without needing to start another project.