Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. a Design and technical issue

a Design and technical issue

Scheduled Pinned Locked Moved C / C++ / MFC
databasecsharpc++javacom
9 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ahmed Charfeddine
    wrote on last edited by
    #1

    I am developing an application that has to act on external data that is both described and provided by the user, the client. Currently I have created a wizard and the user can choose either to provide an SQL database (thus asking him for the DSN and the SQL query) or an XML file (thus asking him to for the appropriate xQuery query) or a CSV file (thus asking him for the file where it resides and the delimiting caracater). Now, this may not be sufficient : I can imagine a plenty of complex scenario such the data cannot fall within those 3 types. What I am tempted to do then is to make it possible for the application to call an external code provided by the user and which will be responsible for retrieving the data so that the application can deal with it. My application is written in unmanaged C++, but the user may want to write that portion of code in JAVA, C# etc. My only idea, which is unfortunately still not clear (regarding implementation) is to write a sort of specification of a COM object : user must write his data-code following that spec. and my application should be able to load available COM objects that fall with particular class and allow the user to select his implementation. Then the application is capable of calling that COM object and retrieving data passed by it. (I am not even good at COM development) So do you have suggestion, is there a sample application I can inspire from ? Thank you in advance.

    Easy Profiler : a compile-time profiler for C++ www.potatosoftware.com

    A C K 3 Replies Last reply
    0
    • A Ahmed Charfeddine

      I am developing an application that has to act on external data that is both described and provided by the user, the client. Currently I have created a wizard and the user can choose either to provide an SQL database (thus asking him for the DSN and the SQL query) or an XML file (thus asking him to for the appropriate xQuery query) or a CSV file (thus asking him for the file where it resides and the delimiting caracater). Now, this may not be sufficient : I can imagine a plenty of complex scenario such the data cannot fall within those 3 types. What I am tempted to do then is to make it possible for the application to call an external code provided by the user and which will be responsible for retrieving the data so that the application can deal with it. My application is written in unmanaged C++, but the user may want to write that portion of code in JAVA, C# etc. My only idea, which is unfortunately still not clear (regarding implementation) is to write a sort of specification of a COM object : user must write his data-code following that spec. and my application should be able to load available COM objects that fall with particular class and allow the user to select his implementation. Then the application is capable of calling that COM object and retrieving data passed by it. (I am not even good at COM development) So do you have suggestion, is there a sample application I can inspire from ? Thank you in advance.

      Easy Profiler : a compile-time profiler for C++ www.potatosoftware.com

      A Offline
      A Offline
      Ahmed Charfeddine
      wrote on last edited by
      #2

      If the COM-based idea is possible, the question then how would I deploy the specs ? Would it be in form of an IDL file ? Is it then possible to take an IDL file and construct a COM project from it ?

      Easy Profiler : a compile-time profiler for C++ www.potatosoftware.com

      1 Reply Last reply
      0
      • A Ahmed Charfeddine

        I am developing an application that has to act on external data that is both described and provided by the user, the client. Currently I have created a wizard and the user can choose either to provide an SQL database (thus asking him for the DSN and the SQL query) or an XML file (thus asking him to for the appropriate xQuery query) or a CSV file (thus asking him for the file where it resides and the delimiting caracater). Now, this may not be sufficient : I can imagine a plenty of complex scenario such the data cannot fall within those 3 types. What I am tempted to do then is to make it possible for the application to call an external code provided by the user and which will be responsible for retrieving the data so that the application can deal with it. My application is written in unmanaged C++, but the user may want to write that portion of code in JAVA, C# etc. My only idea, which is unfortunately still not clear (regarding implementation) is to write a sort of specification of a COM object : user must write his data-code following that spec. and my application should be able to load available COM objects that fall with particular class and allow the user to select his implementation. Then the application is capable of calling that COM object and retrieving data passed by it. (I am not even good at COM development) So do you have suggestion, is there a sample application I can inspire from ? Thank you in advance.

        Easy Profiler : a compile-time profiler for C++ www.potatosoftware.com

        C Offline
        C Offline
        CPallini
        wrote on last edited by
        #3

        Potato software wrote:

        My only idea, which is unfortunately still not clear (regarding implementation) is to write a sort of specification of a COM object : user must write his data-code following that spec. and my application should be able to load available COM objects that fall with particular class and allow the user to select his implementation. Then the application is capable of calling that COM object and retrieving data passed by it.

        Well, the above idea is actually clear: Define one (or more) COM interface the user must implement (or expose COM interfaces from within your application).

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
        [My articles]

        A 1 Reply Last reply
        0
        • C CPallini

          Potato software wrote:

          My only idea, which is unfortunately still not clear (regarding implementation) is to write a sort of specification of a COM object : user must write his data-code following that spec. and my application should be able to load available COM objects that fall with particular class and allow the user to select his implementation. Then the application is capable of calling that COM object and retrieving data passed by it.

          Well, the above idea is actually clear: Define one (or more) COM interface the user must implement (or expose COM interfaces from within your application).

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
          [My articles]

          A Offline
          A Offline
          Ahmed Charfeddine
          wrote on last edited by
          #4

          Thank you Pallini, regarding the implementation I am then puzzled. Would it be an IDL file that describes the object interfaces ? How is it possible let's say for example a Visual Studio C++ user to use an input IDL file in order to create a COM project ? I can't see such options in the Wizard..

          Easy Profiler : a compile-time profiler for C++ www.potatosoftware.com

          C 1 Reply Last reply
          0
          • A Ahmed Charfeddine

            I am developing an application that has to act on external data that is both described and provided by the user, the client. Currently I have created a wizard and the user can choose either to provide an SQL database (thus asking him for the DSN and the SQL query) or an XML file (thus asking him to for the appropriate xQuery query) or a CSV file (thus asking him for the file where it resides and the delimiting caracater). Now, this may not be sufficient : I can imagine a plenty of complex scenario such the data cannot fall within those 3 types. What I am tempted to do then is to make it possible for the application to call an external code provided by the user and which will be responsible for retrieving the data so that the application can deal with it. My application is written in unmanaged C++, but the user may want to write that portion of code in JAVA, C# etc. My only idea, which is unfortunately still not clear (regarding implementation) is to write a sort of specification of a COM object : user must write his data-code following that spec. and my application should be able to load available COM objects that fall with particular class and allow the user to select his implementation. Then the application is capable of calling that COM object and retrieving data passed by it. (I am not even good at COM development) So do you have suggestion, is there a sample application I can inspire from ? Thank you in advance.

            Easy Profiler : a compile-time profiler for C++ www.potatosoftware.com

            K Offline
            K Offline
            KarstenK
            wrote on last edited by
            #5

            why dont you write the data in a xml-file, and use it as input for the app. Is it too easy? :-O Stay away from COM because you have to write both interface sides. I like COM very much for dealing with complex Collaboration as Internet Explorer or Networking.

            Press F1 for help or google it. Greetings from Germany

            A 1 Reply Last reply
            0
            • A Ahmed Charfeddine

              Thank you Pallini, regarding the implementation I am then puzzled. Would it be an IDL file that describes the object interfaces ? How is it possible let's say for example a Visual Studio C++ user to use an input IDL file in order to create a COM project ? I can't see such options in the Wizard..

              Easy Profiler : a compile-time profiler for C++ www.potatosoftware.com

              C Offline
              C Offline
              CPallini
              wrote on last edited by
              #6

              You may use the MIDL output files (i.e. source files or type library, depending on the programming language). See, for instance [^].

              If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
              This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
              [My articles]

              A 1 Reply Last reply
              0
              • C CPallini

                You may use the MIDL output files (i.e. source files or type library, depending on the programming language). See, for instance [^].

                If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                [My articles]

                A Offline
                A Offline
                Ahmed Charfeddine
                wrote on last edited by
                #7

                That's what I am looking for. Exactly. The type of info that can be used both in the consumer application (the COM client which is mine) and the COM server to be written by the user in the language he favors. Thousand thanks.

                Easy Profiler : a compile-time profiler for C++ www.potatosoftware.com

                1 Reply Last reply
                0
                • K KarstenK

                  why dont you write the data in a xml-file, and use it as input for the app. Is it too easy? :-O Stay away from COM because you have to write both interface sides. I like COM very much for dealing with complex Collaboration as Internet Explorer or Networking.

                  Press F1 for help or google it. Greetings from Germany

                  A Offline
                  A Offline
                  Ahmed Charfeddine
                  wrote on last edited by
                  #8

                  Hi and thank you for your answer. The problem is that data is expected to be very very large. Your idea is good : I can ask the user to gather data in a definite XML schema. But the goal is to enable the data retrieval and its processing to be , how can I say it, to be streamlined. Thus if user has a sql database, instead of precessing it into a huge XML file, then passing it to my program , rather the program could ask a COM instance to gather the processed data, one by one and more importantly the program can distribute processing among many CPUs. I don't know, well the data is expected to be big. or let me create a COM interface because I love it. ;)

                  Easy Profiler : a compile-time profiler for C++ www.potatosoftware.com

                  K 1 Reply Last reply
                  0
                  • A Ahmed Charfeddine

                    Hi and thank you for your answer. The problem is that data is expected to be very very large. Your idea is good : I can ask the user to gather data in a definite XML schema. But the goal is to enable the data retrieval and its processing to be , how can I say it, to be streamlined. Thus if user has a sql database, instead of precessing it into a huge XML file, then passing it to my program , rather the program could ask a COM instance to gather the processed data, one by one and more importantly the program can distribute processing among many CPUs. I don't know, well the data is expected to be big. or let me create a COM interface because I love it. ;)

                    Easy Profiler : a compile-time profiler for C++ www.potatosoftware.com

                    K Offline
                    K Offline
                    KarstenK
                    wrote on last edited by
                    #9

                    if you have hugh data you have every time problems. Than it is best to split the data into different files. For instance in binary files (as images) which are stored with a path (or an identifier) in the object data. Splitting data is always good idea, because you wont work and change all data at one time.   :-O

                    Press F1 for help or google it. Greetings from Germany

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups