Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Announcements

Lit Window Library 0.3 released 29

hajokirchhoff writes "The first public release of The Lit Window Library (for C++) is now available at from LitWindow itself. The goal of The Lit Window Library is to speed up C++ GUI coding by a factor of 10. It greatly reduces the amount of work needed to code user interface requirements. This is not just another "better widgets" library. The library introduces two new, different concepts to UI coding: a data abstraction layer (reflections) and rule-based programming."


These will eventually allow the creation of a library of high-level UI design patterns such as "Add/Modify/Delete", "Select 1 of n, m of n", ready to be used out of the box, yet tightly integrated into ordinary C++ code.

Data Abstraction Layer:

While most libraries force their data structures on the programmer, the data abstraction layer enables the library to use almost any struct/class definition or container chosen by the programmer. The library works even with third party data structures, over which a programmer has no control.

Rules based programming:

The library adds a new element to the "Properties, Methods, Events" GUI coding paradigm. The "Rules" mechanism lets a programmer describe the interactions between widgets in a simple rule language. This elminiates the countless OnSomething methods that litter todays GUI source code.

For a comparison between traditional C++ source code and the Lit Window Library read
http://www.litwindow.com/lwl/doc/html/comparison_1 0x.html.

Release and licence:

The library is being released as an open source project hosted at sourceforge and made available under the BSD licence and The wxWidgets Library Licence. The library is using C++ and currently supports wxWidget as the UI framework. Other frameworks may follow.

Comments and feedback is very welcome.

Wanted: Volunteers with linux knowhow to help with porting. Good knowledge of C++ templates and compiler limitations/bugs concerning templates would be very good."
This discussion has been archived. No new comments can be posted.

Lit Window Library 0.3 released

Comments Filter:
  • Long way to go. (Score:4, Interesting)

    by Circuit Breaker ( 114482 ) on Monday October 18, 2004 @07:36AM (#10555263)
    Will probably converge to K or APL eventually.


    When it is comparable to this [nsl.com] example (yes, the text above is both the logic and the GUI for the game below), or this calculator [nsl.com] or spreadsheet implementations [nsl.com] I'll be impressed.
    It may look obfuscated, but it isn't to one versed in K programming. And if you aren't versed, anything (except perhaps Python) looks obfuscated.
    • Re:Long way to go. (Score:2, Insightful)

      by tilk ( 637557 )
      Hey, but it IS ugly and obfuscated. The )@\:&/'s make me think about Befunge, and `l`x`k's about Unlambda. It's cryptic, hides structure and meaning.
      • Maximum substring sum is written in K tersely as "|/0(0|+)\" and verbosely as "max over 0 (0 max plus) scan". More readable?

        It's notation for semantics, and the semantics are what you're missing. K is not readable with just knowledge of C/Java/Lisp; It has a learning curve. But it is well worth it - can you do the max substring sum _efficiently_ in 9 chars?
        • "max over 0 (0 max plus) scan" is not very readable to me. But, the fact that I don't understand this statement is relatively unimportant.

          It's a pretty straightforward translation that you've offer, "|/0(0|+)\" is "max over 0 (0 max plus) scan". Each character in the first translates 1:1 into terms in the second...

          But, why even bother with the first notation? It's pretty ridiculous. *Anyone*, even an expert in the language, would have an easier time reading the verbose version.

          Representing "Maximum s
          • Introducing this "terse line noise" form just increases the barrier to entry.

            True, but it doesn't mean it isn't worth it. To use Perl and Python, Emacs and VI effectively, you need to know regular expressions. They are usually terse line noise but it's a powerful tool once you've learnt it.
    • I worked at a company which had a very C++-like scripting language with added UI elements. This meant you could write stuff like this:

      STRING c = "Title"
      class FOO {
      public:
      FOO(STRING a, INT b, DOUBLE c, FLAG f) : a(a), b(b), c(c), f(f) {}
      STRING a;
      INT b;
      DOUBLE c;
      FLAG f;
      };
      window (caption=c) {
      // A button that changes the caption of the window
      button (caption="Foo", icon="foo.ico") {
      c = "New Title"; // changes caption of window
      };
      vector<FOO> test;
      test.push_back(FOO("list 1", 1, 1.0, TRUE));
      test.

    • Re:Long way to go. (Score:3, Insightful)

      by SamNmaX ( 613567 )
      Will probably converge to K or APL eventually.

      When it is comparable to this example (yes, the text above is both the logic and the GUI for the game below), or this calculator or spreadsheet implementations I'll be impressed. It may look obfuscated, but it isn't to one versed in K programming. And if you aren't versed, anything (except perhaps Python) looks obfuscated.

      I did some J programming a little while back, and K as far as I understand is similar. Anyway, code I wrote in J definately did not loo

  • Part of me knew that despite .Net getting GUI development completely right, that there was still a better way to express constraints in GUI programming beyond glorified code generators. This looks like exactly the ticket.

    Who wants to work on a WTL port of this?
    • .net got GUI development completely right? Please enlighten me, for I am not well versed in the .net stuff, but getting GUI development completely right is something I'd like to understand.

      How does .net handle seperating the UI logic from the code? Can you take an application and switch the UI to something different, like a text-based or web-based one, with minimal reworking of the application logic? How are accessibility issues dealt with? How do you unit test the UI?
  • Cut the fancy talk. How does some "simple" code look like ?
  • Java (Score:3, Interesting)

    by Hard_Code ( 49548 ) on Monday October 18, 2004 @08:52AM (#10555788)
    Hehe...I chuckled as I read the first two examples in documentation, loading and saving settings, and showing a specific type of dialog, since these two utilities are almost identically what is used in Java to do the same:

    Properties p = new Properties();
    p.load(new FileInputStream("/path/to/Settings"));

    ---

    JOptionPane.showMessageDialog(null, "hi!");

    Notwithstanding that we still complain.

    Apparently what C++ needs is just a decent platform and standard library.
    • Do reflections in java support containers? And if so, can you extend them to add your own container implementation?

      IOW: does p.load(...) work if p contains a vector of elements (that may itself contain another vector)?

      And, yes, I agree. C++ needs a decent standard library and reflections should be part of it :)
      • The facility I was citing does not use reflection. The Properties class is simply a hash table which reads a file in the format:

        key=value...

        However, there IS a full-fledged Preferences API which I believe is capable of storing an arbitrary hierarchy of objects, which was introduced due to the deficiencies of stashing flat settings files in user directories (I never personally had a problem with that strategy).

        You can do reflection in Java, but it is a bit cumbersome, and it's too late in the lifespan of
  • How far does this fit w/ the stuff that Boost is producing? It might be a good idea for it to undergo a boost review process at some point, so that some _really_ funky template-foo can be done. Plus, some components of what he's produced could probably be boostifid. For instance, the semantics + syntax of "rules" is very similar to Spirit's rules; perhaps there's a common abstraction there?
    • Re:Boost? (Score:2, Interesting)

      I'd love to use boost and probably will at some point in the future. I all but stole the semantics for + from boost anyway. I didn't use boost at this point because I want to support wxWidgets and that in turn still supports some rather old compilers and I was unsure how well the boost library compiles with them. I also did not want to require yet another library.

      But I agree that I'd love to see some convergence with the boost library.

      BTW, whats the 'boost review process'? I have browsed the boost documen
      • The boost review process is where you simply submit some code, and ask for feedback. It usually follows a request for insertion into boost. The boost people really are the C++ guru's of our day, and they seem to have a philosophy of solid design above everything else.
  • GUI Language (Score:3, Interesting)

    by descubes ( 35093 ) on Monday October 18, 2004 @11:07AM (#10556778) Homepage
    From a concept-programming standpoint, LitWindow seems to be a sort of hacked-together meta-programming language for GUIs. The concepts are good, but the implementation is sorely limited by the language they use (C++).

    For instance, their data adapter are the poor's man meta-program generating useful reflective data from a data structure. You actually need to duplicate the description of the data structure, precisely because this is not a _real_ meta-program, but only a clever hack using the C preprocessor...

    Now, what if you had a real way to extend the language [sourceforge.net] as you need it, rather than this crude hack? Wouldn't it be cool if the data adapters could be generated automagically?

  • MUI! (Score:4, Interesting)

    by EvilIdler ( 21087 ) on Monday October 18, 2004 @12:21PM (#10557431)
    This is wxWindows meets MUI (Magic User Interface on the Amiga).
    Lovely!
  • The code examples, especially the rule-based GUI coding looks a lot like the Cocoa Bindings system in OS X. I wouldn't be suprised if this library was using something similar to Cocoa's controller layer under the hood. What's impressive is that they're able to do this in C++. Objective-C's more dynamic calling system makes this a lot easier.

To be awake is to be alive. -- Henry David Thoreau, in "Walden"

Working...