API from hell



  • I have to work with the awful API of a famous ERP company whose name contains 3 letters. Some features of the API:



    • Some interfaces are incomplete. As an example, IProperties returns a list of IProperty, but IProperty is not implemented.
    • The API does not provide an ORM, it provides a reversed ORM. What I mean is that the database contains serialized objects, and the API offers a pseudo-SQL engine to query the objects.
    • The pseudo-SQL engine will return a maximum of 1000 records, unless you add a TOP xxx (where xxx > 1000)
    • The pseudo-SQL engine will accept any column in a query and will simply return nothing if one of the columns does not exist. No error message.
    • Most objects are property bags of property bags of property bags (etc) but if you go too far in a recursive loop to find a specific property, the root object gets somehow "tired" and stop returning property bags. However it will return regular properties and will not raise an exception. Depending on how deep the loop started, this leads to (surprisingly) unpredictable results.
    • The compatibility between versions of the API is completely random. Some classes disappear for a version or two, then come back. Some methods in version 3 are the same as in version 1, and bugs fixed in version 2 come back alive and kicking in version 3. For a single project I had to use 4 different versions of the API.
    • I do not have irrefutable proof but empirical evidence shows that one of the methods is using the clipboard, or at least puts some garbage in the clipboard. And this is not in a client library, this method is usually called in the back-end on a server.

    Today I tried the latest version of the API and I found out that again some bugs fixed in the last two versions are back. But the workaround I had designed in the past won't work anymore because they removed one of the class involved. If I was not paid by the hour, I would probably go home right now and watch reruns of Gilligan's Island until my mind stops hurting.


  •  @thistooshallpass said:

    I do not have irrefutable proof but empirical evidence shows that one of the methods is using the clipboard, or at least puts some garbage in the clipboard. And this is not in a client library, this method is usually called in the back-end on a server.

    I would think that would be even less of an issue than if it was on the client side? Unless you've got some other process or processes that use the clipboard as well?

    Granted, let's just call a spade a spade and determine this a major WTF regardless.

    @thistooshallpass said:

    If I was not paid by the hour, I would probably go home right now and watch reruns of Gilligan's Island until my mind stops hurting.
     

    Ugh, just having that damn theme song in my head hurts my mind.



  • @thistooshallpass said:

    I have to work with the awful API of a famous ERP company whose name contains 3 letters.
    Would those 3 letters happen to be some combination of S, A and P?  I haven't dealt with it at the programming level, but as just a regular user trying to get work done.  It's one of the few programs that is worse than Lotus Notes.  The manager of our Shipping Dept. quit because it was such a nightmare to deal with.



  • Idiots!  The cardinal rule of a public API is that you can't ever change its external interface.  Who TF do they think they are?

    But this is just as bad:

    @thistooshallpass said:

    Most objects are property bags of property bags of property bags (etc) but if you go too far in a recursive loop to find a specific property, the root object gets somehow "tired" and stop returning property bags.

    Most of the people on this site could have done better than that, even if you picked the language they had to use by drawing from a hat.

    I would love to see the source code for that magnificent WTF on the front page here.



  • I actually need to know. We are in the process of checking out a bunch of ERP solutions and one of my least favorite, so far, is SAP. Oracle Financials also has a stench around it. We already have relationships with CGI and SunGard. Please tell me it's not CGI. I had high hopes for them.



  • @rudraigh said:

    I actually need to know. We are in the process of checking out a bunch of ERP solutions and one of my least favorite, so far, is SAP. Oracle Financials also has a stench around it. We already have relationships with CGI and SunGard. Please tell me it's not CGI. I had high hopes for them.

    I never worked with CGI (unless you talk about "cgi-bin") but I've had a mostly positive experience with Sungard, for software and disaster recovery (they offer both kinds of services). As for Oracle ERP, I mostly worked with PeopleSoft, and I can't say I was thrilled with the data model, with table names such as "PSXPRPTTMPLCTRL" (a real one) and a binary collation, but it was not the worst ERP I've ever had to deal with.



  • @thistooshallpass said:

    • do not have irrefutable proof but empirical evidence shows that one of the methods is using the clipboard, or at least puts some garbage in the clipboard. And this is not in a client library, this method is usually called in the back-end on a server.


    I've seen the clipboard abused for interprocess communication in VB 6 applications.



  • @thistooshallpass said:

  • The compatibility between versions of the API is completely random. Some classes disappear for a version or two, then come back. Some methods in version 3 are the same as in version 1, and bugs fixed in version 2 come back alive and kicking in version 3. For a single project I had to use 4 different versions of the API.

  • Hey, are you working in Java by any chance? I'm actually prepping to soon go through the pain of migrating a SAPJCo 2.1.x server application to SAPJCo 3.0.6. The differences in the API models is disturbing, but not nearly as disturbing as the bugs and compatibility differences between minor versions of SAPJCo 3... (WTF did they do to their connection pooling??)



  • @RHuckster said:

    @thistooshallpass said:
    I do not have irrefutable proof but empirical evidence shows that one of the methods is using the clipboard, or at least puts some garbage in the clipboard. And this is not in a client library, this method is usually called in the back-end on a server.

    I would think that would be even less of an issue than if it was on the client side? Unless you've got some other process or processes that use the clipboard as well?

    Actually, I'd think a server would be worse. At least a user is more likely to have only a single concurrent session going that might want to use the clipboard. Still a WTF, but race conditions seem like a huge possibility for server side clipboards.



  • @boomzilla said:

    @RHuckster said:
    @thistooshallpass said:
    I do not have irrefutable proof but empirical evidence shows that one of the methods is using the clipboard, or at least puts some garbage in the clipboard. And this is not in a client library, this method is usually called in the back-end on a server.
    I would think that would be even less of an issue than if it was on the client side? Unless you've got some other process or processes that use the clipboard as well?
    Actually, I'd think a server would be worse. At least a user is more likely to have only a single concurrent session going that might want to use the clipboard. Still a WTF, but race conditions seem like a huge possibility for server side clipboards.
    Clipboard is thread-safe...



  • @C-Octothorpe said:

    Clipboard is thread-safe...

    Seems like it's more complicated than that. Assuming the backend is .Net.

    MSDN Clipboard Class

    Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

    Anyways, it's definitely not process safe, and I would think the "thread safety" still relies on a sane implementation, which probably rules out this thread.


  • @thistooshallpass said:

    I have to work with the awful API of a famous ERP company whose name contains 3 letters

    I think pretty much all companies with a name length &rt;= 3 have a name which contains 3 letters. Maybe not W3C.



  • @boomzilla said:

    @C-Octothorpe said:
    Clipboard is thread-safe...

    Seems like it's more complicated than that. Assuming the backend is .Net.

    MSDN Clipboard Class

    Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

    Anyways, it's definitely not process safe, and I would think the "thread safety" still relies on a sane implementation, which probably rules out this thread.

    The clipboard is associated to the workstation session (such as the one created when a Windows service is started). That would mean a single clipboard is shared by all the processes and threads created by a service. I'd have to read the GoF book again to make sure, but this feels like a perfect implementation of a singleton, and it has the added benefit of being serializable (such as when Windows go to hibernate). Instead of a WTF maybe this is pure genius!



  • @boomzilla said:

    @C-Octothorpe said:
    Clipboard is thread-safe...
    Seems like it's more complicated than that. Assuming the backend is .Net.
    MSDN Clipboard Class

    Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

    Anyways, it's definitely not process safe, and I would think the "thread safety" still relies on a sane implementation, which probably rules out this thread.
    I know that...  Well, I didn't really, but I was kidding either way (I never read the tags either).

    I would actually put this worse than a dialog on a server because this has a huge potential of currupting data/state.  You can't corrupt data when the machine is frozen... 🙂



  • @rudraigh said:

    I actually need to know. We are in the process of checking out a bunch of ERP solutions and one of my least favorite, so far, is SAP. Oracle Financials also has a stench around it. We already have relationships with CGI and SunGard. Please tell me it's not CGI. I had high hopes for them.

    If you're in manufacturing, give Epicor a chance to demo their software. They aren't built with accounting in mind as their first goal, but with manufacturing in mind. We chose Epicor because of their demos, their documentation, their user base and their price. In a few months I'll know more about the actual software but they seemed to be the best for a business our size.



  • @El_Heffe said:

    Would those 3 letters happen to be some combination of S, A and P?

    My guess would be some combination of M, I and B. 😉



  • @Cad Delworth said:

    @El_Heffe said:
    Would those 3 letters happen to be some combination of S, A and P?

    My guess would be some combination of M, I and B. 😉

    I don't think IBM has an ERP offering. If I'm not mistaken, the last one they had was COPICS and they got rid of it like 10 years ago. (I know COPICS, I've had a lot of fun with it in the 90s).


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.