Profile

Cover photo
Silvio Clecio
Lives in Petrolina, PE
182 followers|56,614 views
AboutPostsPhotosVideos

Stream

Silvio Clecio
owner

Discussão  - 
 
The embryo of Brook 4.0 is growing! :-)
12
1
Marc Hanisch (dubst3pp4)'s profile photoMd. Shariful Alam Khan's profile photoAra Deonas's profile photo
3 comments
 
Very good Silvio!
Add a comment...

Silvio Clecio

Shared publicly  - 
 
Hoje é dia do programador! Todos os anos eu faço uma postagem nesta data pra lembrar o porque de eu gostar tanto de programação. O post dessa edição é algo que eu já venho querendo fazer há algum tempo, que é falar sobre eventos em C. Isso tudo porque depois que eu programei em Delphi há alguns ...
1
Add a comment...

Silvio Clecio

Shared publicly  - 
2
Edwin Yip's profile photo
 
Thanks for sharing, I've reposted it in the Delphi Developers group.
Add a comment...
[Lazarus] Lazarus Release 1.4.2. Mattias Gaertner nc-gaertnma at netcologne.de. Tue Jul 14 13:15:54 CEST 2015. Previous message: [Lazarus] Can't load client library libmysql.dll; Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] ...
17
Add a comment...

Silvio Clecio
owner

Discussão  - 
 
I have plans to implement something like 'Brook Language' (Brool, that's it, BrooL). Imagine this script:

const
  le = LineEnding;
  script =
    'person.persontype.thetype=sometype' + le +
    'person.id=1' + le +
    'person.name=Silvio Clécio' + le +
    'person.docs[0].number=DOC.1' + le +
    'person.docs[0].authors[0]=Chico' + le +
    'person.docs[0].authors[1]=Cesar' + le +
    'person.docs[1].number=DOC.2' + le +
    'person.docs[1].authors[0]=Waldir' + le +
    'person.docs[1].authors[1]=Gilson' + le +
    'person.phones.notes[0]=Call Gilson please' + le +
    'person.phones.notes[1]=Call to 99 9 999-9999' + le +
    'person.phones[0].number=88 9 8888-8888' + le +
    'person.phones[1].number=99 9 9999-9999';

It can populate this objects:

var
  n: string;
  s: string = '';
  doc: TDoc;
  author: TAuthor;
  pho: TPhone;
  per: TPerson;
  psr: TBrookObjectParser;
  src: TStrings;
begin
  per := TPerson.Create;
  psr := TBrookObjectParser.Create(nil);
  src := TStringList.Create;
  try
    src.Text := script;
    psr.Parse(per, src);
    s := 'Type: ' + per.PersonType.TheType + le;
    s += 'ID: ' + IntToStr(per.Id) + le;
    s += 'Name: ' + per.Name + le;
    s += 'Docs: ' + le;
    for doc in per.Docs do
    begin
      s += ' ' + doc.Number + le;
      for author in doc.Authors do
        s += '  by ' + author.Name + le;
    end;
    s += 'Phones: ' + le;
    for pho in per.Phones do
      s += ' ' + pho.Number + le;
    s += 'Notes: ' + le;
    for n in per.Phones.Notes do
      s += ' ' + n + le;
    WriteLn('All object values: ');
    WriteLn(s);
  finally
    src.Free;
    per.Free;
    psr.Free;
  end;
end;

---

  { TAuthor }

  TAuthor = class
  private
    FName: string;
  published
    property Name: string read FName write FName;
  end;

  { TAuthors }

  TAuthors = specialize TFPGList<TAuthor>;

---

  { TDoc }

  TDoc = class
  private
    FAuthors: TAuthors;
    FNumber: string;
  public
    constructor Create;
    destructor Destroy; override;
  published
    property Number: string read FNumber write FNumber;
    property Authors: TAuthors read FAuthors write FAuthors;
  end;

  { TDocs }

  TDocs = specialize TFPGList<TDoc>;

  { TDocsParserItem }

  TDocsParserItem = specialize TBrookParserItem<TDocs, TDoc>;

---

  { TPersonType }

  TPersonType = class
  private
    FTheType: string;
  published
    property TheType: string read FTheType write FTheType;
  end;

  { TPerson }

  TPerson = class
  private
    FDocs: TDocs;
    FId: Integer;
    FName: string;
    FPersonType: TPersonType;
    FPhones: TPhones;
  public
    constructor Create;
    destructor Destroy; override;
  published
    property PersonType: TPersonType read FPersonType;
    property Id: Integer read FId write FId;
    property Name: string read FName write FName;
    property Docs: TDocs read FDocs write FDocs;
    property Phones: TPhones read FPhones write FPhones;
  end;

---

  { TPhone }

  TPhone = class
  private
    FNumber: string;
  published
    property Number: string read FNumber write FNumber;
  end;

  { TPhones }

  TPhones = class(specialize TFPGList<TPhone>)
  private
    FNotes: TStrings;
  public
    constructor Create;
    destructor Destroy; override;
    property Notes: TStrings read FNotes write FNotes;
  end;

---

So, you can create dynamically some HTML controls, enjoying Brool in your inputs, for example:

static input:

<input type="text" name="person.name"/>

inputs dynamically created via JS:

<input type="text" name="doc[0].number"/>
<input type="text" name="doc[1].number"/>
...
<input type="text" name="doc[N].number"/>

And all content would sent via URI: "person.name=ABC&doc[0].number=123&doc[1].number=456...doc[N].number=NNN", avoiding any problems with conversion of "values to HTTP / HTTP to values".

See this topic formated here: http://pastebin.com/hfkjAAW4
1
Leonardo M. Ramé's profile photoSilvio Clecio's profile photoFernando Baroni's profile photo
6 comments
 
Amazing!
Add a comment...

Silvio Clecio
owner

Discussão  - 
 
Welcome, friends. G+ seems a nice platform to discuss ideas about Brook.
5
Fernando Baroni's profile photo
 
I agree, also G+ is beautiful :)
Add a comment...
Have him in circles
182 people
Geniane Arruda's profile photo
julio taborda's profile photo
Paulo Cesar Santana's profile photo
Luana Tsuki Dias's profile photo
Vento em Popa's profile photo
Leonardo Procópio's profile photo
Elinara Soares's profile photo
Francisco Luiz's profile photo
If WebMarketing's profile photo
22
3
Marc Hanisch (dubst3pp4)'s profile photoMichael Schindler's profile photo
2 comments
 
Mac OS X (10.7 and up) fink package descriptions for fpc 3.0.0 and lazarus 1.4.4 are updated. Lazarus 1.6 will follow when finished, as usual.
Add a comment...

Silvio Clecio

Shared publicly  - 
Malvadsonsonson
1
Add a comment...

Silvio Clecio

Shared publicly  - 
 
Last week we announced that we've turned on TurboFan for certain types of JavaScript. In this post we wanted to dig deeper into the design of TurboFan. Performance has always been at the core of V8’s strategy. TurboFan combin...
1
Add a comment...

Silvio Clecio

Shared publicly  - 
2
1
Add a comment...
People
Have him in circles
182 people
Geniane Arruda's profile photo
julio taborda's profile photo
Paulo Cesar Santana's profile photo
Luana Tsuki Dias's profile photo
Vento em Popa's profile photo
Leonardo Procópio's profile photo
Elinara Soares's profile photo
Francisco Luiz's profile photo
If WebMarketing's profile photo
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Petrolina, PE
Links
Other profiles
Work
Occupation
Desenvolvimento de aplicativos Android, websites e webservices.
Basic Information
Gender
Male
Other names
silvioprog