×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    3

    why use resource file to define UI

    Hi, I am new to Symbian and I can't help wondering why use resource file to define UI ?
    It looks weird (especially with those weird syntax)! It reminds me those resource files for Win32 and MFC development. So why can't we use more elegant way to build the UI (like the Java/Swing does) ?

  2. #2
    Registered User
    Join Date
    Jun 2008
    Posts
    6

    Re: why use resource file to define UI

    Hi,
    You can develop most of the UI components in S60 without specifying resource structures. Basically, there are two ways to construct the UI components:
    1. Using resource structs.
    2. Creating at run time.

    Resource structs are supposed to run faster than later one but it is up to the programmer which way he/she decides to go.

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    3

    Re: why use resource file to define UI

    Thanks for the pointers!

    I am not sure if it is just me (and no offence), but those resource files are just "ugly". Why implemented it in this way in the first place?

  4. #4
    Regular Contributor
    Join Date
    Dec 2007
    Location
    Banglore,India
    Posts
    64

    Re: why use resource file to define UI

    until now,no tools are avaiabe to generate UI components in symbian,like drag and drop.so till such tool comes,we have to bear with resource files :-)

  5. #5
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Wink Re: why use resource file to define UI

    Quote Originally Posted by Dattanand View Post
    until now,no tools are avaiabe to generate UI components in symbian,like drag and drop.so till such tool comes,we have to bear with resource files :-)
    Then probably you are missing something. ;) Check S60 UI designer.

    http://blogs.s60.com/creatingcarbide...er_part_1.html

    http://blogs.s60.com/creatingcarbide...cation_ed.html

    Kiran.
    Nokia Developer Wiki Moderation team

  6. #6
    Regular Contributor
    Join Date
    Dec 2007
    Location
    Banglore,India
    Posts
    64

    Re: why use resource file to define UI

    hmm,I use carbide but only express edition ,I dont have this UI designer.

  7. #7
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: why use resource file to define UI

    Quote Originally Posted by Dattanand View Post
    until now,no tools are avaiabe to generate UI components in symbian,like drag and drop.so till such tool comes,we have to bear with resource files :-)
    there are tools that can generate UI code according the UI desginer
    like

    1. Carbide.C++ (with UI designer)
    2. VistaMax

  8. #8
    Registered User
    Join Date
    Jun 2008
    Posts
    3

    Re: why use resource file to define UI

    I think I may not ask my question clearly.
    I was not seeking for a UI builder for symbian. I just want to figure out the design logic (or design constrain) for using the resource files in the first place.
    So does anyone have a clue ?
    Thanks!

  9. #9
    Super Contributor
    Join Date
    Jul 2006
    Location
    Oulu, Finland.
    Posts
    1,174

    Re: why use resource file to define UI

    Quote Originally Posted by qiulang View Post
    I think I may not ask my question clearly.
    I was not seeking for a UI builder for symbian. I just want to figure out the design logic (or design constrain) for using the resource files in the first place.
    So does anyone have a clue ?
    Thanks!

    Keeping source code and resource files separate, gives lots of advantages , the major is localization, other is, you only need to recompile resource files if there are any changes in the UI elements but the application should be designed properly for that, hence you don't need to recompile source codes in this case.

  10. #10
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: why use resource file to define UI

    A lot of this has to do with history and the language. Symbian (and its Licencees S60 and UIQ) provides a lot of the infrastructure for an application in C++ that is already prebuilt, so like MFC so it is not really practical to reinvent the wheel with more code to rebuild the controls with prompteries and creating dynamic applications the way C# does.

    Additionally to provide a consistant framework across devices, the underlying OS uses a framework calls LAF which dictates how controls should look and where they should be on the screen so that there is a common style to all applications.

    The UI does what you want to already it is just hidden from your view.
    If you want to use an alternative, you could consider Net60 which provides C# in Symbian.

    See http://wiki.forum.nokia.com/index.php/GUI_Framework for more information.
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

Similar Threads

  1. How to edit resource file (.rss) in CW 3.1
    By madsum in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 8
    Last Post: 2009-01-16, 15:00
  2. problem when importing from carbide c++ to vs 2003!
    By misfit.physics in forum Symbian Tools & SDKs
    Replies: 12
    Last Post: 2008-02-19, 09:45
  3. problem including a resource file
    By doesitmatter in forum Symbian
    Replies: 6
    Last Post: 2007-10-15, 09:38
  4. create MD5 for a file...
    By GeKI in forum Symbian
    Replies: 3
    Last Post: 2006-06-02, 11:15
  5. Nokia Image Converter
    By davidpurdie in forum General Development Questions
    Replies: 0
    Last Post: 2004-02-18, 15:31

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×