Web Development

  Homes arrow Web Development arrow Why Dont You Build A Quick and Dirty User Int...
 Webmaster Tools
Base64 Encoding 
Browser Settings 
CSS Coder 
CSS Navigation Menu 
Datetime Converter 
DHTML Tooltip 
Dig Utility 
DNS Utility 
Dropdown Menu 
Fetch Content 
Fetch Header 
Floating Layer 
htaccess Generator 
HTML Encoder 
HTML Entities 
IP Convert 
Meta Tags 
Password Encryption
Password Strength
Pattern Extractor 
Ping Utility 
Pop-Up Window 
Regex Extractor 
Regex Match 
Scrollbar Color 
Source Viewer 
Syntax Highlighting 
URL Encoding 
Web Safe Colors 
Forums Sitemap 
Weekly Newsletter
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Contact Us 
Site Map 
Privacy Policy 
  >>> SIGN UP!  
  Lost Password? 

Why Dont You Build A Quick and Dirty User Interface?
By: Developer Shed
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating:  stars stars stars stars stars / 0

    Table of Contents:

    Rate this Article: Poor Best 
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article




    Why Dont You Build A Quick and Dirty User Interface?
    by Gunter Gerdenitsch

    On your computer, frequently you will have to do a job with several different applications involved. You can not clearly foresee in which order they will be needed, it will be different in each case. Only one thing is for sure: it will have to be done repeatedly, on a number of files.

    The conventional way to do that would be to type the same stuff again and again, carefully watching out always to have the right file. That's inefficient, it's tedious, and after a while it is highly error-prone.

    At that point, as a seasoned computer-user you will consider to AUTOMATE the whole process. You build yourself a "user interface": At the beginning, the file name is made the default name. Each time before it is processed by an application, the default name is suggested. To accept it, you only need to press the ENTER-key. Otherwise you can simply overwrite it.

    Till recently, building such a user interface was not so simple. It required some full-fledged programming. A reasonable investment this was only for a rather long-term requirement. For a one-time use it was just too "heavy".

    With 'DLG light', however, now you can do that within a few minutes. Simply write a batch-file combined of a few universal components, strung together by some environment variables.

    Generally such a "quick-and-dirty" user interface will be made up of a universal component 'OFFER' whose parameter is the text to be displayed for prompt (or the name of the file holding the text). You just press a key determining the next step of processing. Depending on that key a certain value is returned. By this return value the control is branching out to several processing options. At the end of each processing option the control returns to OFFER - for prompting for the next cycle. As in the following coding scheme.

    OFFER "press A - option 1;press B - option 2; ... "
    IF ERRORLEVEL 2 GOTO option2
    IF ERRORLEVEL 1 GOTO option1

    GOTO next

    GOTO next

    Each processing step starts with another universal component, QUERY. By it the name of the current file is suggested and/or the processing options. They were transferred from another processing step by means of environment variables. If you agree to these defaults, you simply press the ENTER key. As well, you can overwrite it. Then your entry is set to this environment variable. By bracketing the name of the environment variable in %...%, the operating system knows that it should substitute the name of the variable by its current value. [A third parameter might be needed to declare the name of the .bat-file by which the modified value(s) are made effective, if they were overwritten.] Thus the application of a processing step is always provided with the right parameters.

    QUERY "%file% %options%" envvar_n
    IF ERRORLEVEL 1 CALL envvar_n.bat
    APPLIC_n %file% %options%
    GOTO next

    Some Windows-versions (like Windows 95, Windows 98) execute a batch file in asynchronous mode. That is, an executable called by the batch file is launched in a thread of its own, while the batch file itself keeps going on. In such a Windows-version it's better to use another tool, DO:

    DO Do.lst ... /b

    Do.lst is a plain ascii-file with all the applications you want to have in your user interface, line by line:


    Note the option /b : Due to it DO is not closed once you select one of the applications but kept in the background. When you are finished with that application and close it, DO appears again, ready for your next selection.

    Similarly, there is a number of other universal components available in 'DLG light'. You can download them for free from http://www.1st-components.com

    By doing so you can see the significant difference between one of the usual components and the "universal components" of '1st Components Design'.

    The term "component" is something like a buzzword in the software business, for some 20-30 years now. But when you look closer at those "components", they all have a clear-cut functionality. They either "fit" into your user interface or they don't fit. There is hardly any chance to modify their layout or behavior.

    Contrary to that, 1st Components Design developed the concept of "universal" components. Components that have no fixed functionality but behave flexibly, depending on the value of one or more parameters. In 'DLG light' they are given by your command line parameters.

    These parameters are represented by the environment variables bracketed in %...% that are written in the same line following the name of the component (OFFER, QUERY, etc.)

    A "quick-and-dirty" user interface is not such a minor thing. We use it ourselves for all our installation procedures. Many little procedures that are typically used only once, so a full-fledged programming (with top performance, etc.) would not be reasonable. What's much more economical here is a highly versatile construction from a few components. Thus we can build an installation within a few minutes, to a clear outcome.

    By a 'quick-and-dirty' user interface you can combine individual tools to an integrated "work bench". Any number of tools, any kind of tools, any "work bench". Tailor-made to your needs. Your imaginativeness is the only limit.

    Why is it called "quick-and-dirty" user interface? Well, the "quick" will be clear by now. "Dirty" it is in terms of its performance and user friendliness - which are far from optimum, of course. If you want to build a good, "clean" user interface, you should consider using our full DLG product line.

    Article by Gunter Gerdenitsch, owner of '1st Components Design', Universal Software Components for Computer Applications without Programming ( http://www.1st-components.com,
    mailto:gunter@1st-components.com ).
    He is the specialist for the everyday use of the computer.

    This article is free to be re-printed, if complete with this resource box. It can be included in a web site if it is linked to www.1st-components.com.

    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

    More Web Development Articles
    More By Developer Shed



    - On Page SEO for New Domains
    - Improve Your Site`s Speed
    - Safari Books Online Review
    - Creating an Estore From the Ground Up
    - Most Common SEO Mistakes Developers Make
    - Making the Most of Your Titles and Meta Desc...
    - Five Ways Using Flash Can Damage Your Site
    - A Web Designer`s Guide to Colors
    - Use Webstarts to Create a Free Site
    - More Than Just Looks. How Your Web Design C...
    - How to Design Content Pages
    - Mint Review
    - Make Your WordPress Website Look Professional
    - How to Create a Mobile Web Site
    - Meta Tags: Still Useful?

    Developer Shed Affiliates


    © 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap