Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-25 Thread el es via Lazarus
On 22/09/17 15:44, Marcos Douglas B. Santos via Lazarus wrote:

> So, you can do like them: just use Google Translator.   :)
> 
> Regards,
> Marcos Douglas
> 

Am 22.09.2017 15:51 schrieb "el es via Lazarus" :
>

>Google Translate does a rather good job of translating the articles :)

>Regards,
>Sven


I'll give it a try, thanks :)

-L.

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-24 Thread Marcos Douglas B. Santos via Lazarus
On Sat, Sep 23, 2017 at 5:25 AM, Graeme Geldenhuys via Lazarus
 wrote:
> On 2017-09-21 04:06, Marcos Douglas B. Santos via Lazarus wrote:
>>
>>
>> Nah... most of them know nothing about true OOP.
>> They believe that an object is a "record" with getters and setters...
>> anyway.
>
>
> If I understand you correctly... referring to Java developers, then that is
> a totally wrong generalisation.

Ok, I will rephrase: most that I know, met, or that I read an article
or comment on the internet.

>> As you said, each his own style. What is more important is keeping
>> this excellent community united, around that great language called
>> Object Pascal.
>
>
> I love Object Pascal too, and have a real soft spot for it (and always
> will). But G*D damn, Java is brilliant too. Not just Java the language, but
> the millions of frameworks and tools built around it too (JPA, Spring Boot,
> Jenkins, Maven etc). Also the understated Java Annotations are unbelievably
> powerful and can (and does) reduce the amount of boilerplate code
> tremendously(*).
>
> FPC doesn't even cover the most basic of things - no decent debugger that
> can handle all the Object Pascal language features. :-/

Unfortunately, I have to agree about the debugger.  :(

> * Take a gander at how much Java Annotations reduced boiler plate code
>   using JPA in EJB 3.0 and later vs EJB 2.1 which didn't use
>   annotations.
>
>
> http://web.archive.org/web/20100731223045/http://www.oracle.com/technetwork/articles/javaee/jpa-137156.html

Thanks,

Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-24 Thread Michael Van Canneyt via Lazarus



On Sun, 24 Sep 2017, Graeme Geldenhuys via Lazarus wrote:


On 2017-09-24 09:02, Graeme Geldenhuys via Lazarus wrote:

Of course I would normally agree with that, but if you look at the Java
annotations in that article



Just curious, I know C# has annotations support too. Does Delphi?


Yes. 
It's called Attributes. FPC has it too, but it is not yet in trunk.


Michael.
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-24 Thread Graeme Geldenhuys via Lazarus

On 2017-09-24 09:02, Graeme Geldenhuys via Lazarus wrote:

Of course I would normally agree with that, but if you look at the Java
annotations in that article



Just curious, I know C# has annotations support too. Does Delphi?

Regards,
  Graeme

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-24 Thread Graeme Geldenhuys via Lazarus

On 2017-09-24 08:31, Sven Barth via Lazarus wrote:

Holy Trinity of programming (with the third being operating systems) I
personally am not surprised as writing any of those three is a hard task,
much harder than e.g. a documentation generator and we definitely don't
have the manpower for that.


Well, some of use have attempted that in the past - myself included. 
Good progress was made, but little time always being the enemy of open 
source, and nobody jumping in to help meant many of those debugger 
efforts has stopped. But that's the joys of open source - people only 
work on what they find interesting - if they have the time. :)


Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-24 Thread Sven Barth via Lazarus
Am 23.09.2017 18:30 schrieb "Graeme Geldenhuys via Lazarus" <
lazarus@lists.lazarus-ide.org>:
>
> On 2017-09-23 12:36, Michael Van Canneyt wrote:
>>>
>>> FPC doesn't even cover the most basic of things - no decent debugger
>>> that can handle all the Object Pascal language features. :-/
>
> >
>>
>> Of course not. FPC is not a debugger, it is a compiler.
>
>
> Strange then that FPC includes many other tools like documentation
generators and such. But something as critical as a debugger has always
been brushed under the carpet (low or no priority). A compiler and debugger
go hand-in-hand as part of a developer's "toolbox" - think minimum
requirements.

Considering that both compilers and debuggers are considered part of the
Holy Trinity of programming (with the third being operating systems) I
personally am not surprised as writing any of those three is a hard task,
much harder than e.g. a documentation generator and we definitely don't
have the manpower for that.

Regards,
Sven
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-23 Thread Michael Van Canneyt via Lazarus



On Sat, 23 Sep 2017, Graeme Geldenhuys via Lazarus wrote:


On 2017-09-23 12:36, Michael Van Canneyt wrote:

FPC doesn't even cover the most basic of things - no decent debugger
that can handle all the Object Pascal language features. :-/

>

Of course not. FPC is not a debugger, it is a compiler.


Strange then that FPC includes many other tools like documentation 
generators and such.


Touché :-)

A good debugger is indeed sorely missed.

Michael.-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-23 Thread Michael Van Canneyt via Lazarus



On Sat, 23 Sep 2017, Graeme Geldenhuys via Lazarus wrote:


On 2017-09-21 04:06, Marcos Douglas B. Santos via Lazarus wrote:


Nah... most of them know nothing about true OOP.
They believe that an object is a "record" with getters and setters... 

anyway.

If I understand you correctly... referring to Java developers, then that 
is a totally wrong generalisation.




As you said, each his own style. What is more important is keeping
this excellent community united, around that great language called
Object Pascal.


I love Object Pascal too, and have a real soft spot for it (and always 
will). But G*D damn, Java is brilliant too. Not just Java the language, 
but the millions of frameworks and tools built around it too (JPA, 
Spring Boot, Jenkins, Maven etc). Also the understated Java Annotations 
are unbelievably powerful and can (and does) reduce the amount of 
boilerplate code tremendously(*).


FPC doesn't even cover the most basic of things - no decent debugger 
that can handle all the Object Pascal language features. :-/


Of course not. FPC is not a debugger, it is a compiler.

But if you put the combined resources of IBM and Oracle at our disposal,
we'll quickly catch up.


* Take a gander at how much Java Annotations reduced boiler plate code
  using JPA in EJB 3.0 and later vs EJB 2.1 which didn't use
  annotations.


http://web.archive.org/web/20100731223045/http://www.oracle.com/technetwork/articles/javaee/jpa-137156.html


That's actually a step backwards.
Because it breaks the separation of object and storage.

Good for some quick and dirty prototyping, but a potential disaster in the long 
run.

It suffices that the DBA decides to move (part of) the data for storage, and
you're dead...

I have to manage an API where the same data can meanwhile come from 1 to 4 
different
kinds of databases, depending on some (for all practical purposes) random parameter. 
Luckily, at the start I separated storage and object.


Michael.
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-23 Thread Graeme Geldenhuys via Lazarus

On 2017-09-21 04:06, Marcos Douglas B. Santos via Lazarus wrote:


Nah... most of them know nothing about true OOP.
They believe that an object is a "record" with getters and setters... anyway.


If I understand you correctly... referring to Java developers, then that 
is a totally wrong generalisation.




As you said, each his own style. What is more important is keeping
this excellent community united, around that great language called
Object Pascal.


I love Object Pascal too, and have a real soft spot for it (and always 
will). But G*D damn, Java is brilliant too. Not just Java the language, 
but the millions of frameworks and tools built around it too (JPA, 
Spring Boot, Jenkins, Maven etc). Also the understated Java Annotations 
are unbelievably powerful and can (and does) reduce the amount of 
boilerplate code tremendously(*).


FPC doesn't even cover the most basic of things - no decent debugger 
that can handle all the Object Pascal language features. :-/



* Take a gander at how much Java Annotations reduced boiler plate code
  using JPA in EJB 3.0 and later vs EJB 2.1 which didn't use
  annotations.


http://web.archive.org/web/20100731223045/http://www.oracle.com/technetwork/articles/javaee/jpa-137156.html




Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-22 Thread Sven Barth via Lazarus
Am 22.09.2017 15:51 schrieb "el es via Lazarus" <
lazarus@lists.lazarus-ide.org>:
>
> On 21/09/17 17:49, Marcos Douglas B. Santos via Lazarus wrote:
>
> >
> > [1] My posts about inheritance https://goo.gl/nzM4Ss
> >
>
> If it only was in English ;) Unfortunately knowing Esperanto (once upon a
time)
> only gets you so far as 5% ;)

Google Translate does a rather good job of translating the articles :)

Regards,
Sven
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-22 Thread Marcos Douglas B. Santos via Lazarus
On Fri, Sep 22, 2017 at 10:51 AM, el es via Lazarus
 wrote:
> On 21/09/17 17:49, Marcos Douglas B. Santos via Lazarus wrote:
>
>>
>> [1] My posts about inheritance https://goo.gl/nzM4Ss
>>
>
> If it only was in English ;) Unfortunately knowing Esperanto (once upon a 
> time)
> only gets you so far as 5% ;)

The blog is written in Portuguese.
Maybe I can be far from readers here, on this list. But remember that
Brazil — Portuguese speakers — is a huge country and I have a consider
audience. There are others countries that speak Portuguese too, as
Portugal of course.

However, the second largest audience in my blog, comes from English
speakers. Third comes from Portugal. Believe or not.

So, you can do like them: just use Google Translator.   :)

Regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-22 Thread el es via Lazarus
On 21/09/17 17:49, Marcos Douglas B. Santos via Lazarus wrote:

> 
> [1] My posts about inheritance https://goo.gl/nzM4Ss
> 

If it only was in English ;) Unfortunately knowing Esperanto (once upon a time)
only gets you so far as 5% ;)

-L.

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-21 Thread Marcos Douglas B. Santos via Lazarus
On Thu, Sep 21, 2017 at 5:00 AM, Michael Schnell via Lazarus
 wrote:
> On 20.09.2017 22:09, Marcos Douglas B. Santos via Lazarus wrote:
>>
>> In a perfect design, we may only connect all objects to work in a "task",
>> call "run", and "they" will know what to do. They (Objects) will decide how
>> to do. Not the programmer (the "controller"). Just objects sending messages
>> for each other.
>
> Is that what the (language construct) "Interface" is supposed to provide ?

No. But Interfaces are very important. There is not true OOP without
"contracts" — that is what Interfaces are.
You can use inheritance to provide polimorphism, but inheritance could
be evil and should be avoided[1] as much you can. Instead, use
composion.
Others languages are using "duck typing", but I believe Interfaces are better.

Regards,
Marcos Douglas

[1] My posts about inheritance https://goo.gl/nzM4Ss
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-21 Thread Marcos Douglas B. Santos via Lazarus
On Thu, Sep 21, 2017 at 2:57 AM, leledumbo via Lazarus
 wrote:
> Free Pascal - Lazarus mailing list wrote
>> Hi,
>>
>> I'm working in my new "pet project" called Xavier.
>> Xavier is an object-oriented library for work with XML.
>>
>> The motives and announcement is on the forum:
>> http://forum.lazarus.freepascal.org/index.php/topic,38343.0.html
>
> Apart from not needing to free memory and simpler nodes retrieval, I can't
> really see any difference with DOM. I was expecting some kind of DSL to work
> with XML in a declarative way, but unfortunately it still looks imperative.

I've just started this project and we don't have the 1.0 version yet.
Any ideas could be considered at this point.

Regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-21 Thread Anthony Walter via Lazarus
Marcos,

What and where are James.Data, James.Data.Clss?

Have you seen my XML interface at this url?

https://github.com/sysrpl/Cross.Codebot/blob/master/source/codebot.text.xml.pas

It might be helpful to study and/or consider. Example:

var
  D: IDocument;
  N: INode;
  F: IFiler;
begin
  D := CreateDocument;
  N := D.Force('config/settings');
  F := N.Filer;
  F.WriteStr('name', 'Marcos')
  F.WriteInt('@luckyNumber', 7);
  WriteLn(D.Text);
  D.Beautify;
  WriteLn(D.Text);
end;

Output:

Marcos



  
Marcos
  

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-21 Thread R0b0t1 via Lazarus
On Wed, Sep 20, 2017 at 5:33 PM, Michael Van Canneyt via Lazarus
 wrote:
>
>
> On Wed, 20 Sep 2017, Marcos Douglas B. Santos via Lazarus wrote:
>
>> On Wed, Sep 20, 2017 at 4:31 PM, Michael Van Canneyt via Lazarus
>>  wrote:
>>>
>>>
>>>
>>> On Wed, 20 Sep 2017, Marcos Douglas B. Santos via Lazarus wrote:
>>>
 Hi,

 I'm working in my new "pet project" called Xavier.
 Xavier is an object-oriented library for work with XML.
>>>
>>>
>>>
>>> I don't understand the 'why' ? Should I understand that you consider the
>>> DOM
>>> units not object-oriented ?
>>
>>
>> Yes and no.
>>
>> Michael, with all my respect, that depends of your view about Object
>> thinking.
>> Yes, DOM uses classes and objects, but IMO Objects is more than that.
>> Objects are more close to Functional programming than most people think.
>
>
> As I understand it, objects are exactly the opposite of functional
> programming,
> in that they encapsulate state, and functional programming wants to avoid
> state (variables, if you want).
>

You can think of an object's data as a monad's data, and the methods
in the objects in a hierarchy as the various monadic functions which
operate on that data.

In a typical functional language the monadic functions and their
arguments do not have any hierarchical relation.

>> If can code classes but if you are implementing (all) in an imperative
>> way, I mean line by line telling the computer how to do something
>> instead of code what you just want, you may not are thinking in terms
>> of Objects. Your class, in these cases, is just a "bucket of data and
>> procedures".
>
>
> Yes. That's what an object is.
>
>>
>> In a perfect design, we may only connect all objects to work in a
>> "task", call "run", and "they" will know what to do.
>
>
> Ah. You just replace methods by objects.
>
> You should be programming Java:
> https://steve-yegge.blogspot.be/2006/03/execution-in-kingdom-of-nouns.html
>
> I prefer imperative programming. (verbs, if you want). It comes more
> natural.
>
> Well, each his own style. But, if you allow me: the post on the lazarus
> forum and the Xavier page should really explain what you mean by OOP. I
> guess most people will be confused, as I am.
>
> Thanks for explaining.
>
> Michael.
>
> --
> ___
> Lazarus mailing list
> Lazarus@lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-20 Thread leledumbo via Lazarus
Free Pascal - Lazarus mailing list wrote
> Hi,
> 
> I'm working in my new "pet project" called Xavier.
> Xavier is an object-oriented library for work with XML.
> 
> The motives and announcement is on the forum:
> http://forum.lazarus.freepascal.org/index.php/topic,38343.0.html

Apart from not needing to free memory and simpler nodes retrieval, I can't
really see any difference with DOM. I was expecting some kind of DSL to work
with XML in a declarative way, but unfortunately it still looks imperative. 



--
Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-20 Thread Marcos Douglas B. Santos via Lazarus
On Wed, Sep 20, 2017 at 7:33 PM, Michael Van Canneyt via Lazarus
 wrote:
>
> [...]
>
> You should be programming Java:
> https://steve-yegge.blogspot.be/2006/03/execution-in-kingdom-of-nouns.html

Nah... most of them know nothing about true OOP.
They believe that an object is a "record" with getters and setters... anyway.

> I prefer imperative programming. (verbs, if you want). It comes more
> natural.
>
> Well, each his own style. But, if you allow me: the post on the lazarus
> forum and the Xavier page should really explain what you mean by OOP. I
> guess most people will be confused, as I am.

As you said, each his own style. What is more important is keeping
this excellent community united, around that great language called
Object Pascal.
And indeed is a good tip. I'll improve the README. Thank you.

>
> Thanks for explaining.

You're welcome.

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-20 Thread Michael Van Canneyt via Lazarus



On Wed, 20 Sep 2017, Marcos Douglas B. Santos via Lazarus wrote:


On Wed, Sep 20, 2017 at 4:31 PM, Michael Van Canneyt via Lazarus
 wrote:



On Wed, 20 Sep 2017, Marcos Douglas B. Santos via Lazarus wrote:


Hi,

I'm working in my new "pet project" called Xavier.
Xavier is an object-oriented library for work with XML.



I don't understand the 'why' ? Should I understand that you consider the DOM
units not object-oriented ?


Yes and no.

Michael, with all my respect, that depends of your view about Object thinking.
Yes, DOM uses classes and objects, but IMO Objects is more than that.
Objects are more close to Functional programming than most people think.


As I understand it, objects are exactly the opposite of functional programming,
in that they encapsulate state, and functional programming wants to avoid
state (variables, if you want).


If can code classes but if you are implementing (all) in an imperative
way, I mean line by line telling the computer how to do something
instead of code what you just want, you may not are thinking in terms
of Objects. Your class, in these cases, is just a "bucket of data and
procedures".


Yes. That's what an object is.



In a perfect design, we may only connect all objects to work in a
"task", call "run", and "they" will know what to do.


Ah. You just replace methods by objects.

You should be programming Java:
https://steve-yegge.blogspot.be/2006/03/execution-in-kingdom-of-nouns.html

I prefer imperative programming. (verbs, if you want). 
It comes more natural.


Well, each his own style. But, if you allow me: the post on the lazarus
forum and the Xavier page should really explain what you mean by OOP. I
guess most people will be confused, as I am.

Thanks for explaining.

Michael.
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-20 Thread Marcos Douglas B. Santos via Lazarus
On Wed, Sep 20, 2017 at 4:31 PM, Michael Van Canneyt via Lazarus
 wrote:
>
>
> On Wed, 20 Sep 2017, Marcos Douglas B. Santos via Lazarus wrote:
>
>> Hi,
>>
>> I'm working in my new "pet project" called Xavier.
>> Xavier is an object-oriented library for work with XML.
>
>
> I don't understand the 'why' ? Should I understand that you consider the DOM
> units not object-oriented ?

Yes and no.

Michael, with all my respect, that depends of your view about Object thinking.
Yes, DOM uses classes and objects, but IMO Objects is more than that.
Objects are more close to Functional programming than most people think.
If can code classes but if you are implementing (all) in an imperative
way, I mean line by line telling the computer how to do something
instead of code what you just want, you may not are thinking in terms
of Objects. Your class, in these cases, is just a "bucket of data and
procedures".

In a perfect design, we may only connect all objects to work in a
"task", call "run", and "they" will know what to do.
They (Objects) will decide how to do. Not the programmer (the
"controller"). Just objects sending messages for each other.

Yeah, looks so philosophical... :)

I've been writing a blog about this for two years
http://objectpascalprogramming.com/

...and I use these same concepts in production code, of course.

Best regards,
Marcos Douglas
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] [ANN] Xavier for XML — Compatible with FPC and Delphi

2017-09-20 Thread Michael Van Canneyt via Lazarus



On Wed, 20 Sep 2017, Marcos Douglas B. Santos via Lazarus wrote:


Hi,

I'm working in my new "pet project" called Xavier.
Xavier is an object-oriented library for work with XML.


I don't understand the 'why' ? 
Should I understand that you consider the DOM units not object-oriented ?



Michael.
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus