<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hello Jan,<br>
<br>
I hadn't thought about Magritte. Magritte seems like a good match
for what I wanted. I can let it handle the majority of cases and
optimize where necessary when a field or object requires more.<br>
<br>
Thanks for the suggestion.<br>
<br>
Jimmie<br>
<br>
On 1/1/2011 10:18 AM, Jan van de Sandt wrote:
<blockquote
cite="mid:AANLkTik6ekYeqBh3YLByrY=dAher57Vuj=++qzeXfMc3@mail.gmail.com"
type="cite">Hello Jimmie,
<div><br>
</div>
<div>I had to do something similar a while ago. I had to support a
complex XML schema for a standard message format of the Dutch
government (StUF).</div>
<div><br>
</div>
<div>The Java implementation used JAXB to generate a few thousand
data objects. Very clumsy.</div>
<div><br>
</div>
<div>In Smalltalk I made some code to generate Magritte
descriptions for all the structure and field definitions in the
XML schema. Using the Magritte descriptions it was very easy to
read and write messages in the correct format. I created real
classes only for the few message types that required some logic.
For all the other message types I used some generic class that
stores the values in a dictionary.</div>
<div><br>
</div>
<div>So my advice is to have a look at Magritte. It can help you
handle the type information without creating/generating lots of
classes.</div>
<div><br>
</div>
<div>Jan.</div>
<div><br>
</div>
<div><br>
<br>
<div class="gmail_quote">
On Fri, Dec 31, 2010 at 11:24 PM, Jimmie Houchin <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:jlhouchin@gmail.com">jlhouchin@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
Hello,<br>
<br>
I am porting the FIX protocol to Squeak/Pharo.<br>
<a moz-do-not-send="true" href="http://www.fixprotocol.org/"
target="_blank">http://www.fixprotocol.org/</a><br>
<br>
It is the Financial Information eXchange protocol. It is
used by many firms in the financial industries, stocks,
forex, etc.<br>
<br>
There is good documentation and also a semi-reference
implementation in Java.<br>
<a moz-do-not-send="true" href="http://www.quickfixj.org"
target="_blank">http://www.quickfixj.org</a><br>
<br>
I have a partial port started but I wanted a check with
those who know more than I about proper Smalltalk coding.<br>
<br>
In the Java implementation there are over 2000 classes. In
the protocol there are approximately 90 message types and
956 field types.<br>
<br>
I am initially creating the message classes as they form the
basis of the protocol and the fields are simply instance
variables and methods in the message classes.<br>
<br>
I am not porting the Java library. I am implementing the
protocol in Smalltalk from the documentation.<br>
<br>
Initially I have created a Fix44Field class with its
necessary variables.<br>
There are several versions of the Protocol and FIX 4.4 is
the one required for my application.<br>
<br>
With this Fix44Field class I am creating a Dictionary with
the 956 different field types. I am planning on creating a
constructor method which will create the desired field from
the information in the dictionary about the field and its
properties.<br>
<br>
Am I way off base here? Should I really create the 956
classes necessary to for each field in addition to the 90 or
so message classes, and then I don't know what else I
haven't discovered yet. Having 1000+ classes just seems
unwieldy and naively it just doesn't feel like the Smalltalk
way. I could be wrong, but I haven't seen such an example to
my memory. I don't know enough about Java to know if it is
good Java form either.<br>
<br>
When I have a reasonably fleshed out, tested and working
solution, I will make the source available under a MIT
license. I would love to see Squeak/Pharo become an out of
the box viable option for trading applications.<br>
<br>
Advise and wisdom greatly appreciated.<br>
<br>
Thanks.<br>
<font color="#888888">
<br>
Jimmie<br>
</font></blockquote>
</div>
</div>
</blockquote>
<br>
</body>
</html>