Menu

project is alive!

DWS Forum
2007-06-12
2013-04-15
  • hannes hernler

    hannes hernler - 2007-06-12

    there were some questions, whethter the project is alive:
    hello! it's still living.

    the point is, where should the project go to?

    it is a component for easy object pascal (delphi like) scripting.
    it has all functions you would need to add scripting to your app.
    you can extend the script language with your own libraries, classes,
    persitant objects...
    should the component grow more complex?

    I use it in my apps to add scripting. I use it to procude html code,
    to produce reports, to controll user settings, to update/fix database
    records via email support.
    I buuilt a isapi webserver extension library and use it as alternative
    for PHP for special projects. I do NOT want to replace PHP, there should be
    a difference. my webapp is written in delphi. only the VCL TPageProducer
    is to simple. so I use the DWS scripting to insert my values and variables
    into the html code.

    I think it is ok. I do not need more from the DWS component.
    what do you think? what would you need?

    (oh yes some years ago I dreamed of further developement for web apps.
    but JSP has got all I was dreaming of for DWS. why should I invent
    wheel again? Sun and IBM are behind JSP. how could I outrun them?
    and JAVA EE and JSP is open for open source too. so I use DWS for my delphi
    apps and if I need more Enterprise Power I go to JSP)

     
    • Marcel Küng

      Marcel Küng - 2007-06-18

      If you're looking for something to do with DWS how about adding Unicode support? At the moment everything internally (including the token parser) is using strings instead of widestrings so things like this

      s := 'Unicode character here:'#20303;

      don't work. Even though Variants can hold widestring values there's no way to actually use them in DWS - or at least I haven't found a way to do it.

      I'm not sure exactly what is required as I'm only now looking at how to support Unicode within DWS myself but it seems if the Compile code accepted a widestring argument rather than a string argument and the tokenizer code handled widestrings instead of strings (such as the TToken class) it might not be that hard an exercise.

      Cheers,
      Marcel

       
      • hannes hernler

        hannes hernler - 2007-06-19

        you are right. that's a project.
        I would need it myself for a website in german and czech.
        I will see how we could make this possible.

        hannes hernler

         
    • Marcel Küng

      Marcel Küng - 2007-06-19

      Not that I've got much further investigating this but I have made a couple of initial changes that go some way towards this. In dws2Tokenizer I have changed the TToken class to:

        TToken = class
          FTyp: TTokenType;
          FPos: TScriptPos;
          FString: widestring; //string;
          FFloat: Double;
          FInteger: Integer;
          constructor Create;
        end;

      and in the TTokenizer.ConsumeToken method I've changed the character range test to $FFFF instead of $FF and put the following in:

         Result.FString := Result.FString + WideChar(Word(StrToInt(s)));

      and this seems to work quite nicely. I haven't been able to do very much testing though. The next change would be to revamp the dws2StringFunctions unit to use widestrings instead of strings and I'm going to look at that in the next day of so but overall unless there's some nasty surprises I think it should be a fairly easy exercise.

      Cheers,
      Marcel

       

Log in to post a comment.