ExtJS 4 smartphone size - extjs

I had very simple appication written for old (24x80) terminals
working in production company. My client ask me to transfer it
as a web application and I use ExtJS 4 to do it. It looks like
this:
and its working on pc stations without any problem.
But next question of my client is to modify this application to
work also on tablets and smartphones. And only problem we see
is proportion, on smartphone this screens are to small. What is
the best way to do it? How can I resize fields and fonts and buttons depending on screen size?

What you need is a Responsive Application.
The problem is that the responsiveConfig was introduced in ExtJS 5.
So if you cannot move to extjs 5.0 or above take a look at this answer.
Another aproach is to use multiple instances for the view. Create three different view instances, one for desktop, one for tablet and one for mobile, keep the same Controller, Model, Store etc and when you initialize your application display the correct view according to the screen size.

Related

What should I focus when migrating from a non-responsive reactjs website to responsive one

I have inherited a non-responsive website that was created using reactjs. It is a fairly large website, that uses fixed layout. I have been tasked with evaluating/measuring the risks/effort of making the current website responsive. As i see it, these are the different things that I need to evaluate/accomplish that will help me with my goal
Go from fixed layout to relative layout. This might include using a grid layout or something similar
Decide on the app's flow, look and feel on mobile vs desktop. By this I mean, how should the links look when viewed in a mobile phone (maybe a hamburger menu) vs links that are laid out flat in a desktop browser.
What does it take to make individual components that make up the website responsive using media queries.
My question is should I prioritize one over another for whatever reason? And am I missing anything else that I should be focussing on
Thanks
K

How to make an app that would work fine for both iphone 5 and 4s

I am making an iphone app using the latest Xcode i.e Xcode 4.5.1.
The current XIB files are suited for iphone 5. I am not sure how to make the app that would work on both the screen sizes i.e 3.5 and 4 inch??
Is it that I have too use two different sets of *XIB*s??
Check out this answer, it's the approach I took.
Basically, create two different xibs or storyboards and choose which one to use at application launch.
2 different xib is a kind of solution but you need to play with AutoResizing property of View if you don't want to create different xib's. Also you need to use Default#2x.png for iPhone4 and Default-568#2x.png for iPhone5, these are the SplashScreen images to identify whther app is running on iPhone4 or iPhone4.
If you have created iPhone4 compatible application then just add Default-568#2x.png image. Your application will work for iPhone5. But you need to handle UI for this. For example if you are using UITableView so just use Flexible height instead of hardcore frame.

Web App V Win App - Display differences

I have been searching for any info on this without success.
I am updating an application that has two versions. A WPF windows app and an MVC web app. The requirement is that they must look the same.
Why when I add an image of, say, 100px X 100px to both the image in the web app looks larger than the image in the win app?
If I add margins the space between the items looks more in the win app than it does in the web app.
I thought I was mistaken so I physically measured both and confirmed the differences.
I want the 100X100 image in both apps to look the same and do not want to up size as this will distort the image.
Can anyone explain why this would happen and any way I can get around it?
Many Thanks
Fred
Assuming no styling is being applied to the images either in XAML or CSS, they could still be different because WPF pixels are device independent.
I guess you could set the ScaleTransform of your WPF app to match the desired size, but remember this will be different depending on monitor size and Windows DPI settings.

How far do you go with Mobile First Responsive Design?

I'm retro-fitting a website for Mobile First Responsive Design (MFRD). My question is - how far do you go with the "Mobile First" part?.
For example - on the homepage I plan on having a list of upcoming events, say 4 or 5. On the mobile version I thought 2 would be enough to save screen real-estate. Should I load the other events in dynamically for the larger views, or should I just hide them since it will only be a few elements anyway?
Loading them dynamically for larger sizes means I have to attach an event to the window resize which typically gets fired every pixel. Even though I can offset that with Timeout, that's still a lot of client side checking is it not (even though it's not like users are constantly resizing their browsers).
I mean, even though you're designing for mobile first, you also have to consider the larger sizes right? Obviously larger JavaScript libraries and other assets that are needed for larger only you want to pull in later and not load for mobile - but how crazy do you want to get with the bandwidth saving?
What is the target market for the website? Are you making a completely responsive website that encapsulates smartphone to desktop? Or are you just concentrating on smartphone to tablet?
Mobile First really just means start your styling and content views at the smallest form factor and work up as the device dimensions get bigger. HTML, CSS (media queries) and jQuery all play a part to expand the UI and manipulate (show/hide) content elements as the browser gets bigger.
Take a look at Smashing Magazine, their responsive layout is one of the most extensive I have seen so far, it will give you an idea of how far you can take the MFRD or DARL (Device Agnostic Responsive Layout) methodologies.

WP7 and silverlight similar navigation flow

I am developing the application which consists of two pages. The first page is a menu where you can navigat to the second page which is some sort of a map. This application supposes to be run on Windows Phone 7 and Silverligth 4. Everything is built up on the MVVM pattern. For S4 I am using Unity, for WP7 I am creating very simply IoC container.
Getting to the bottom of the matter, I need to provide this application with a common navigation system. I know that S4 supports the new interface INavigationContentLoader which allows us to use our own content loader. Unfortunately, this does not work for WP7.
I am also thinking about taking advantage of the Shell/Frame approach. Basically we have a shell or a frame control with a replaceable content. The navigation in this case is about replacing content. But I am afraid that this solution won't work properly for WP7, since the BACK button will close the app instead of stepping back to the previous page.
Guys, do you have other ideas? What solution do you have? I want to stress that this solution should be consistent with MVVM.
Best regards Jarek
For such a small simple app I'd create my own wrapper around selecting the navigation mode dependent upon the platform.
Something like:
void MyNavigate(uri page)
{
#IFDEF WINDOWS_PHONE
NavigationService.Navigate(page);
#ELSEIF
NavigateTo(page); // or whatever is appropriate to your Silverlight 4 app
#ENDIF
}

Resources