Thursday 24 March 2016

Responsive UI Support in Oracle ADF 11g

To support ADF applications for mobiles and tablets it's a big challenge on Oracle ADF 11g where as in Oracle ADF 12c versions we can easily develop responsive screens based on requirement.

Using responsive and adaptive design we can support ADF applications in tablets as well as in mobiles.

Using CSS3 media queries we can achieve responsive and adaptive design.

Responsive design works on a single fluid website that can look good on any device. Using media queries we can fix the layout based on device resolution.

Adaptive Web Design is different from Responsive Design in that there isn’t one layout that always changes. Instead, there are several distinct layouts for multiple screen sizes, and the layout used depends on the screen size used.

Major difference between Oracle ADF 11g and Oracle ADF 12c:

CSS3 media query won't support inside the skin definition on Oracle ADF 11g but it supports in Oracle ADF 12c releases.

Major guidelines to achieve responsive and adaptive design: 

1. Use panelGroupLayout layout elements: Set panelgroupLayout element as vertical then will rendered like html div element.
2. Fluid Grids:Use percentage(%) sizes instead of pixels and points e.t.c
3.Write Media queries in external css file because it won't support in skin definition i.e registered skin file.
4.Don't use stretch layouts like PanelGridLayout.
5. For input components add simple property as true then it will render like span element otherwise it will render like table.
6.Avoid using PanelBorderLayout, PanelGroupLayOut(as horizontal) because they will render like table element.
7. Add specified meta tag property in the page template or in respective pages.

Wireframe Designs as per Resolutions:

     We need to get clarity about how the screen looks in specific resolutions.

1.Desktop

2.Tablet




3.Mobile



If we observe above designs then components alignments and font sizes are varying.In this case media query plays major role to achieve the requirement.

Below are the steps to implement responsive design in ADF 11g application .

1.First we need to embed external Responsive css file in page like mentioned below,


2.Add Meta tag in page template or in the respective pages.


3.Responsive css changes:
 
   In desktop, label and input content are left to stack each other, In this case label width is 25% and inputText content width is 75%.


The below css classes are for desktop resolution.

    .formLabelText{
     width:25%;
     }
   .formInputText
    {
     width: 75%;
    }

 In tablet, label and input content are vertical to each other, In this case label width is 100% then automatically content will move to down.

The below css classes are for tablet resolution.

     @media screen and (max-width:768px) {
     .formLabelText{
     width: 100%;
     margin-top: 10px;
     }
    .formInputText
    {
    width: 100% !important;
    }
   .mainRootContainer{
     margin: 4% !important;
    }
    }

The below css classes are for mobile resolution

  @media screen and (max-width:420px) {
  .formInputText input
   {
    margin-top: 8px !important;
   }
   .formTitle{
    font-size: 24px;
    }
    }

    @media screen and (max-width:360px) {

     .formTitle{
     font-size: 16px;
      }
    }

 I hope this post will definitely help you to achieve responsive design.

For better understanding download below link.
                                                                                Responsive Sample POC

30 comments:

  1. Replies
    1. This comment has been removed by the author.

      Delete
    2. Hi Venkat,

      I encountered an issue with the way of including meta tags in jspx page. In ur POC app, meta tags are just inside jsp root tag which works but cause some weird behavior with show popup behavior tag.

      So best way to use it as mentioned in below blog to avoid such weird ADF behavior:

      http://tamanmohamed.blogspot.in/2011/11/include-meta-data-tags-in-head-element.html

      Delete
  2. “Designers are the only users who really care about design, everyone else want’s their pages to load fast.”Nonsense. Everyone wants good design and their pages to load fast. I’d say that’s a part of good design.

    Cado Magenge
    Responsive Web Design Company Melbourne
    iPhone Application Development Melbourne
    Web Design and Development Company

    ReplyDelete
  3. Thanks for the very informative blog and I extremely grateful that you perform this piece of writing very simply, I mean to say that it's quite simple to read and understand. Website Design Company Bangalore | Website Development Company Bangalore

    ReplyDelete
  4. Thanks for kind information on web designing. Literally one of the best article on the topic.

    Responsive Web Design Company

    ReplyDelete
  5. But what if we need to have horizontal panelgrouplayout on our jsff page. if we use horizontal layout responsive Ui doesn't work . it doent take width in % . can we achieve this with vertical panelgroup layout?

    ReplyDelete
  6. Your sharing is valuable! And whatever you posted is working and along with some in-depth theoretical explanation. Very very appreciated!

    ReplyDelete
  7. It is a great website.. The Design looks very good.. Keep working like that!.
    wordpress web design

    ReplyDelete
  8. The major guidelines for creating an effective responsive and adaptive design are must to remember. Whole post is full of helpful content. keep posting.

    Website designing company Indore

    ReplyDelete
  9. One of the best posts on responsiveness.Thanks for sharing valuable information.keep posting

    ReplyDelete
  10. can you post vadio to show . us . how . you did . this form . like . that . in ADF

    Thank you .

    ReplyDelete
  11. SEO makes a good effect on business and help businessman to grow their business. It helps in making traffic in seo field.
    SEO Experts in Bangalore

    SEO Company Bangalore
    affordable seo packages in india

    ReplyDelete
  12. Good support! Your blog is like professional! Do you want to find best premium wordpress templates for any kind of business? go here https://wordpresstemplates.ch/

    ReplyDelete
  13. kit tattoo 35 0f the first 43 U.S. Presidents reportedly have tattoos.

    ReplyDelete
  14. Really an interesting and amazing post. Thanks for sharing this wonderful informative article here. I appreciate your hard work.Web Designing Company Bangalore | Website Design Company Bangalore

    ReplyDelete
  15. Hey, this day is too much good for me, since this time I am reading this enormous informative article here at my home. Thanks a lot for massive hard work. read more

    ReplyDelete
  16. The blog was having very informative content and very useful for me. Well done post and keep it up... Thanks for sharing such a Useful info about Website Design. Get the Best Web Design Agency with Innovative and Creative Web Designs with cheap web design Services. Website design services

    ReplyDelete