IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Does our situation fit your criteria?
We've got a bunch of c++ functions running on a variety of Windows boxes.[1] We're running our website with PHP on Linux. (Soon to be PHP on OSX.[2]) The c++ functions encapsulate a lot of the business rules, so we'd like to use them directly rather than reimplement in PHP.

What we're doing is passing an XML request from the web server to an app server that extracts the request and passes it on to the appropriate function. The results are returned in XML and extracted by the calling PHP script.

Cool thing IMO is that once we upgrade MySQL[3] we'll be able to use the same exact method. Basically we're going to encapsulate the business rules behind an XML interface so the Windows apps, webserver, DBs and whatever else we may add in the future will have a common API.

Or we may just be doing it because XML is cool, I haven't made up my mind on that yet.



[1] Yes Scott, I know.

[2] Look, I know, OK? I'm not the one making the decision.

[3] See above.
===

Implicitly condoning stupidity since 2001.
New That's part of what Scott meant by "loose coupling".
And if he didn't, he does now. :)


I'm gonna go build my own theme park! With Blackjack! And hookers! In fact, forget the park!
New Only you are using the data
You are both the producer and consumer of the data in the requests as far as I can tell - you could use whatever you want. I'd use PLists. I have code that does PLists and they are smaller and easier to parse than xml. Plus the data structure you get back is sane. Not some electric koolaid acid candy colored DOM thing.



Smalltalk is dangerous. It is a drug. My advice to you would be don't try it; it could ruin your life. Once you take the time to learn it (to REALLY learn it) you will see that there is nothing out there (yet) to touch it. Of course, like all drugs, how dangerous it is depends on your character. It may be that once you've got to this stage you'll find it difficult (if not impossible) to "go back" to other languages and, if you are forced to, you might become an embittered character constantly muttering ascerbic comments under your breath. Who knows, you may even have to quit the software industry altogether because nothing else lives up to your new expectations.
--AndyBower
Expand Edited by tuberculosis Aug. 21, 2007, 06:36:15 AM EDT
New Got a link for PLists? (google give too many to dig through)
===

Implicitly condoning stupidity since 2001.
New Explain it right here
PLists are arbitrary combinations of dictionary, list, and strings.

to encode a string - if its a token (only letters, numbers, and maybe dot) just write it. If it has any other character encode it like a C style string constant (\\n\\r\\t\\ \\"are the main escapes) and put it in double quotes.

to encode a list its ( item1, item2, item3 )

where item[123] is any plist element

to encode a dictionary its { key1 = value1; key2 = value2; }

where key[12] and value[12] is any valid plist element.

Thats it. I have a java class that does this - if you want I can sent it to you and you can port it to C++.

The interface is a stream. PList.write(aPlistObject); and object = PList.read(aStream);

Two functions. Very simple to write. Express any structure in the world. Human readable.



Smalltalk is dangerous. It is a drug. My advice to you would be don't try it; it could ruin your life. Once you take the time to learn it (to REALLY learn it) you will see that there is nothing out there (yet) to touch it. Of course, like all drugs, how dangerous it is depends on your character. It may be that once you've got to this stage you'll find it difficult (if not impossible) to "go back" to other languages and, if you are forced to, you might become an embittered character constantly muttering ascerbic comments under your breath. Who knows, you may even have to quit the software industry altogether because nothing else lives up to your new expectations.
--AndyBower
Expand Edited by tuberculosis Aug. 21, 2007, 06:36:27 AM EDT
New How about multi-dimensional arrays?
===

Implicitly condoning stupidity since 2001.
New Lists of lists



Smalltalk is dangerous. It is a drug. My advice to you would be don't try it; it could ruin your life. Once you take the time to learn it (to REALLY learn it) you will see that there is nothing out there (yet) to touch it. Of course, like all drugs, how dangerous it is depends on your character. It may be that once you've got to this stage you'll find it difficult (if not impossible) to "go back" to other languages and, if you are forced to, you might become an embittered character constantly muttering ascerbic comments under your breath. Who knows, you may even have to quit the software industry altogether because nothing else lives up to your new expectations.
--AndyBower
Expand Edited by tuberculosis Aug. 21, 2007, 06:36:32 AM EDT
New Re: Only you are using the data
Todd: [...] I'd use PLists. [...]

Have you seen Yaml? ([link|http://www.yaml.org|http://www.yaml.org])
--
-- Jim Weirich jweirich@one.net [link|http://onestepback.org|http://onestepback.org]
---------------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
New Too complicated



Smalltalk is dangerous. It is a drug. My advice to you would be don't try it; it could ruin your life. Once you take the time to learn it (to REALLY learn it) you will see that there is nothing out there (yet) to touch it. Of course, like all drugs, how dangerous it is depends on your character. It may be that once you've got to this stage you'll find it difficult (if not impossible) to "go back" to other languages and, if you are forced to, you might become an embittered character constantly muttering ascerbic comments under your breath. Who knows, you may even have to quit the software industry altogether because nothing else lives up to your new expectations.
--AndyBower
Expand Edited by tuberculosis Aug. 21, 2007, 06:39:28 AM EDT
New Was just reminded that's not always going to be true
We anticipate exposing this interface so customers can update status on their orders, add remarks, etc directly from their own systems. Rather than have one interface for internal use and a separate one for external use, we're just going to build the one public interface and then use it internally.
===

Implicitly condoning stupidity since 2001.
     XML Mania is driving me crazy - (bluke) - (29)
         AAAAHHH!! Make it stop! -NT - (deSitter)
         AAAAHHH!! Make it stop! -NT - (deSitter) - (2)
             Bug!? - (deSitter) - (1)
                 Uh huh. - (pwhysall)
         There are only two reasons to use XML: - (admin) - (15)
             Re: There are only two reasons to use XML: - (deSitter)
             Does our situation fit your criteria? - (drewk) - (9)
                 That's part of what Scott meant by "loose coupling". - (FuManChu)
                 Only you are using the data - (tuberculosis) - (7)
                     Got a link for PLists? (google give too many to dig through) -NT - (drewk) - (3)
                         Explain it right here - (tuberculosis) - (2)
                             How about multi-dimensional arrays? -NT - (drewk) - (1)
                                 Lists of lists -NT - (tuberculosis)
                     Re: Only you are using the data - (JimWeirich) - (1)
                         Too complicated -NT - (tuberculosis)
                     Was just reminded that's not always going to be true - (drewk)
             Re: There are only two reasons to use XML: - (neelk) - (3)
                 Agreed. - (admin) - (2)
                     An effort to make this constructive and educational - (FuManChu) - (1)
                         PLists on sockets - (tuberculosis)
         Luddite standing in the way of progress! :) - (a6l6e6x)
         XML - Some Thoughts - (gdaustin)
         Winnah! of the Lucid Post of the Month award! - (jb4)
         Let's promote a relational alternative - (tablizer) - (5)
             But... - (gdaustin)
             Spitting - (tuberculosis) - (3)
                 But you see, Todd? - (gdaustin) - (2)
                     I don't think its the PHBs - (tuberculosis) - (1)
                         Another possibility... - (gdaustin)

Chips, dips, chains, whips.
167 ms