Menu

give me informations plz

2005-01-26
2013-03-07
1 2 > >> (Page 1 of 2)
  • Nobody/Anonymous

    hi,
    I would like to know, do you atoms manages:
    -stored procedures?
    -available sample ?
    - type of relation (1,n n,n ...)?
    -where to find UML diagram?
    -managing connection (possibility of taking again the hand)?
    -databinding?
    that's all thank you very much!

     
    • Richard Banks

      Richard Banks - 2005-01-26

      1. Stored Procedures
      They can be executed via the framework, but it does not create them in the database

      2.  Samples
      Have a look at the web site (http://jcframework.sourceforge.net) in the Articles/Tutorials section.  Also look in the source download to see a few example projects

      3.  Relations
      1-1, 1-N (N-M via two 1-N associations).

      4.  UML diagram
      I do not have one, however look at Scott Amblers white paper (the link is on the web site) and you'll see the basis for this project

      5. Managing connection
      It's managed within the framework.  You can access and use the connection yourself if you need to.

      6.  Databinding
      Databinding support is included.  Complex binding (ie editable data grids) needs a small amount of work in your business classes to work.  There is an example in the source download.

      I hope that answers everything for you

      - Richard

       
    • Nobody/Anonymous

      very good THX !
      but i don't to find the white book?

       
    • Nobody/Anonymous

      last question plz
      what is the maturity of the atoms(how many versions, date of dev, performances, tests in a application...)
      thank you for the answer !

       
      • Richard Banks

        Richard Banks - 2005-01-27

        The link to the white paper is on the front page of the web site (in the welcome message).  In any case just go to http://www.ambysoft.com/persistenceLayer.html and download the persistencelayer.pdf file.

        As for the other questions

        AtomsFramework has had many releases.  The history is as follows
        0.0.1
        0.0.2
        0.0.3
        0.0.4
        0.0.5
        0.0.6
        0.1.0
        0.1.1
        0.1.2
        0.1.3
        0.1.4
        0.1.5
        0.1.6
        0.1.7
        0.1.8
        0.1.9
        1.20
        1.22
        1.23
        2.0 Release Candidate 1
        2.0 Release Candidate 2
        2.0

        The first version 0.0.1 was released in September 2003 and has been updated about once a month up until November.

        I think most of the functionality I wanted to include is there now so the version releases will probably slow down somewhat.

        Also there are very few reported bugs now so stability seems to be quite good.

        I currently use the product in two WinForms based commercial applications and I know that it is used in an ASP.NET system in Brazil and an open source business application as well.  Where else and how it is used I don't really know but most people who give feedback say they are very happy with it and quite impressed (which is always a good thing to hear).

        - Richard.

        P.S. If you are trying to present a case to management for using the software you can always tell them that there is no vendor lock in when using open source software and that you have complete access to the code if anything goes wrong.  If you want commercial support for the framework please contact me via email to discuss.

         
    • Nobody/Anonymous

      oki it's very good your framework is nice !
      I will contact you if I have a problem.

       
    • Nobody/Anonymous

      ohh erfff atoms don't manage ORACLE !!!!!
      i'm very shocked !!!

       
      • Richard Banks

        Richard Banks - 2005-01-31

        Oracle support is present (using the Microsoft ADO.NET data provider), but I don't know anyone with a copy that I can test it on.  For this reason Oracle support is listed as beta.

        I don't have the money to purchase a copy of Oracle myself, but I'm always willing to take donations :-)

        - Richard.

         
    • Nobody/Anonymous

      said me plz???? manage Oracle yes or no????

       
    • Nobody/Anonymous

      good i know
      it's true that licence Oracle is expensive, the company where I work have the professional licence
      if i choice this orm, i will give my result to you.
      Ted

       
    • Nobody/Anonymous

      It's a newbe question. Sorry

      What is the utility of proxy flag in CPercistentObject ?
      And my other one.

      In the collection of CPercistentObject in the CPersitenceBroker how can you make the diffrence between a old object and a new object that have the same ID in the database.

      thanks you

       
    • Nobody/Anonymous

      It's a newbe question. Sorry

      What is the utility of proxy flag in CPercistentObject ?
      And my other one.

      In the collection of CPercistentObject in the CPersitenceBroker how can you make the diffrence between a old object and a new object that have the same ID in the database.

      thanks you

       
      • Richard Banks

        Richard Banks - 2005-03-19

        Newbie questions are fine :-)

        The proxy flag indicates that the attribute should be populated when a proxy version of the object is loaded.  Proxy objects are loaded via CRetrieveCriteria or when associations are marked as RetrieveAutomatic="lazy".

        As for question 2, I'm not quite sure what you are asking. The framework uses a dirty flag on an object to determine if it has changed.  For classes that inherit from CPersistentObject the class must set the flag via the SetDirtyFlag method.
        Timestamps attributes can be used to ensure that no-one else has changed the record in the database before it is saved.

        I hope that answers your questions.

        - Richard

         
    • Nobody/Anonymous

      I'm the same newbie :-)

          In the CPersitenceBroker the propetie m_cache As CCacheCollection, what it's utility ? If you cache every object that your request from the database, the collection doesn't become too big and take lost of ressource for the server ?

           And my other one, the IOD,propertie, what it's utility ? I understand that it a unique ID for a object. But in the DB, the tables doesn't have sequentiel id, the key for the table will be the IOD of the object ?

         thanks Richard

       
      • Richard Banks

        Richard Banks - 2005-03-21

        Hi Newbie :-)

        the m_cache is the cache of every object retrieved from the database.  The cache features an autoexpiry interval (default 30 minutes) and can also be cleared via the ClearCache method.

        In practical use I haven't yet filled the cache enough to encounter resource (ie memory) restrictions.  Obviously this is a possibility but we'll cross that bridge when we get to it.  (it should just be a matter of clearing objects from the cache via age, and maybe putitng on a maximum memory limit)

        The OID property (object ID) is an _optional_ way of performing key abstraction.  You could also use GUIDs for this purpose or just continue on using multipart key attributes as per traditional relational database design.

        If you use OIDs or GUIDs as your object key then you db table should have the OID or GUID (as a string) column as the primary key.  It is also recommended that the traditional relational key be added as an alternate unique index (if applicable).

        Normally the traditional key attributes will be mapped to the find key and the OID/GUID will be used as the primary key (ie for the Retrieve method).

        - Richard.

         
    • François

      François - 2005-03-22

      Hi Richard,

                       it's the newbie strike back with his questions of the day.

                      I search in the sample where you search a object with condition. I found objects like "CLIKECRITERIA" but do you have any example or tutorial for use it.

                   And i have a other question. For the CPercistenceBroker object , the good practice is to create each time you need get object create a broker like that :
      CPercistenceBroker  myObj = new CPercistenceBroker ()

      or create a singleton and just get the same object for all application ?

      I think the solution 2 is the better but in your sample you doesn't use it, why ? And what it's the method to get the broker, i don't find the method that return always the same object.

      thanks in advance for my question, but percistence framework is very intersting and i want to understand this one who are very good.

      exarkuun the newbie

                  

       
      • Richard Banks

        Richard Banks - 2005-03-22

        The newbie has a name :-)  Hi Franois

        Here's an example using a LIKE condition

        dim rc as new CRetrieveCriteria
        dim acc as new Account

        rc.ClassMap = acc.getClassMap()
        rc.WhereCondition.addSelectLike("NAME","Acc%")
        dim cc as CCursor = rc.perform()
        while not cc.EOF
        acc = new Account
        cc.loadObject(acc)
        debug.writeline(acc.NAME)
        cc.NextCursor()
        end while

        Apart from the CRetrieveCriteria and the CSummaryCriteria the other C*Criteria classes are used internally by the framework and aren't really meant for use in applications.

        The persistencebroker should be a singleton.  Unfortunately that code came across from the original VB6 and I've never cleaned it up.

        The first time you initialise the persistence broker you can use the constructor and then call .init().
        Alternatively (and this is probably the better method) you can use the getPersistenceBrokerInstance() method.

        - Richard

         
    • François

      François - 2005-03-24

      Hi Richard,

                      Ready for others newbie's question :-).

                    For good practice and performance it's better if i use stored proc on SQL server or use your framework to make transaction with de DB ?

                     I know thta i see code that show how execute stored proc but i can't find it anymore. Do you have a exemple or a tutorial that show me this ? because on the tutorial on this web site, it doesn't explain how i can do that.

                 thanks

       
      • Richard Banks

        Richard Banks - 2005-03-29

        Stored procedures vs Framework:

        The framework supports execution of stored procedures via the CPersistenceBroker.ProcessStoredProcedure however persistence of objects using stored procedures is not supported.

        In order to persist an object in a database you must use the framework.

        For reference using a stored procedure calls are
        ProcessStoredProcedure(databaseName, sqlstring)
        -and-
        ProcessStoredProcedure(database, sqlstring)

        Example C# code would be
        CCursor objCursor = objPersistenceBroker.ProcessStoredProcedure("databaseName", "exec MyStoredProcedure");
        return objCursor.CurrentRow["MyField"].ToString();

         
    • François

      François - 2005-03-25

      Hi Richard,

                       In the XML file, i define :
          <database name="Sample1" class="CMsSqlDatabase">
              <parameter name="name" value="..\..\sample1.mdb" />
              <parameter name="user" value="sa" />
              <parameter name="password" value="sa"/>
          </database>

      For a SQL server DB, i write what in the value of  the attribute name of tag database , the name of my database ? But in the attribute name of the first parameter i write whatin the name attribute ?

      thanks in advance and happy Easter

      Franois

       
      • Richard Banks

        Richard Banks - 2005-03-29

        SQL Server

        <database name="Sample1" class="CMsSqlDatabase">
          <parameter name="server" value="MySQLServer" />
          <parameter name="name" value="MyDatabase" />
          <parameter name="user" value="sa" />
          <parameter name="password" value="sa"/>
        </database>

        Also, if you use SSPI then you can do something like

        <database name="Sample1" class="CMsSqlDatabase">
          <parameter name="serverName" value="MySQLServer" />
          <parameter name="name" value="MyDatabase" />
          <parameter name="user" value="SSPI" />
        </database>

        Finally, if you are using the latest CVS version (v2.1) the database node would be
        <database name="Sample1" provider="AF_MSSQL.dll">

         
    • François

      François - 2005-03-25

      i forget to ask...

               <parameter name="name" value="..\..\sample1.mdb" />

      For msAcccess DB, i need to wrote this for conenct to my DB, but for Ms SQL server i need to write the connection string or someting different ?

      sorry for the 3 questions in a row
      Franois

       
    • François

      François - 2005-03-31

      Hi Richard,

                       Thanks you very much for your help, that work perfectly but when i get a collection of all object with : myObj.getAll(False). There is this error :
      OIDValue <error: an exception of type:{System.NullReferenceException} occurred>.

      I don't use IODValue and cache in my test, but how can i disabled this function ?

      And when i will want use it, how can i manage the value of the IOD for each of my objects ? Your framework do it for us or i need to do something ?

      thanks and don't eat too much of chocolate

      Franois

       
    • François

      François - 2005-03-31

      Hello Richard,

                             I try to update a row in DB but the update raise a error, because it try to update the id of my object with the others columns, how can i told to the framework that my Id can't be updated because it't the primary key ? There it's my xml definition.

          <class name="CEmploye" table="Employe" database="Atom">
              <attribute name="Id" column="Id" key="primary" find="true"/>
              <attribute name="CreatedDate" column="CreatedDate" timestamp="true"/>
              <attribute name="ModifiedDate" column="ModifiedDate" timestamp="true"/>
              <attribute name="Nom" column="Nom" proxy="true"/>
              <attribute name="Prenom" column="Prenom" proxy="true"/>
          </class>

      thx sorry if my questions is very basic.

      Franois

       
    • François

      François - 2005-04-07

      Hi Richard,

                       I answer my questions by my own. It was not hard questions anyway.

              Franois

       
1 2 > >> (Page 1 of 2)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.