PC Review


Reply
Thread Tools Rate Thread

Application design

 
 
David
Guest
Posts: n/a
 
      10th Apr 2009
Hi all,

Part of my current project brief is to create certain things to be as
flexible as possible for new (unknown) projects down the line.

I have done quite a bit on the way...

For example, I was asked to be able to receive files by email (POP3 or
SMTP). This now (after a lot of struggling) works.

The email handler will then push the attached files to a web service. The
reason I have done it this way is that in the future, the email handler
could potentially be taken out of the equation and the sender connect
directly to the web service.

One of the files coming in is an XML file. Basically, to keep it as flexible
as possible, all I know about the XML is that it follows a set pattern, but
the contents will be variable (for example, in the current project, I can
receive 7 different patterns of xml. Imagine it as an excel sheet, with
different column names at the top)

So, as I know what each of the 7 patterns look like, I can create a mapping
to the database. The webservice knows nothing about the database and nothing
about the XML. I have a mapping (for each of the 7 patterns) file that
describes what database I need, what DB table I need, and what data in the
incoming XML maps to the fields in the table.


This works brilliantly and it means that any future project can use it with
no modification. All I have to do is create a mapping file. Another benefit
is that if the DB or the incoming XML changes, all I have to do is modify
the mapping file and not have to re-compile the application. (I have to use
SQL Client to connect tot he DB, as to work with Linq, I have to know the
table structure and of course, the webservice can't know the DB structure).


Anyhow, the problem I have is that some information that is required in the
table has to come from other areas of the database. For example, I have an
ID number come in the XML. This ID number belongs to a person, but is not
his ID in the database. However, the DB will know the ID as it is assigned
to that person. The problem is that this particular ID can be re-assigned at
any time.

So, my thoughts are to extend the DB tables (the ones I am mapping to) to
contain the persons DB ID rather than the incoming ID. However, as I don't
know the db structure from the webservice, I can't really collect it. So, my
thoughts are to some how have the web service have a hook of some sort into
a 'customer specific' function. The customer specific function will be
delivered as an add-on.

So, my web service should connect to the customer specific function to do
any jobs the customer requires to the data.

How should I write this connection? I want to somehow extend the generic web
service without the web service actually knowing what the customer function
does.


Thanks for any advice you can offer.
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available


 
Reply With Quote
 
 
 
 
Jesse Houwing
Guest
Posts: n/a
 
      10th Apr 2009
Hello David,

This sounds so much like a problem where Biztalk would be the ideal solution...
have you looked at its features?

Jesse

> Hi all,
>
> Part of my current project brief is to create certain things to be as
> flexible as possible for new (unknown) projects down the line.
>
> I have done quite a bit on the way...
>
> For example, I was asked to be able to receive files by email (POP3 or
> SMTP). This now (after a lot of struggling) works.
>
> The email handler will then push the attached files to a web service.
> The reason I have done it this way is that in the future, the email
> handler could potentially be taken out of the equation and the sender
> connect directly to the web service.
>
> One of the files coming in is an XML file. Basically, to keep it as
> flexible as possible, all I know about the XML is that it follows a
> set pattern, but the contents will be variable (for example, in the
> current project, I can receive 7 different patterns of xml. Imagine it
> as an excel sheet, with different column names at the top)
>
> So, as I know what each of the 7 patterns look like, I can create a
> mapping to the database. The webservice knows nothing about the
> database and nothing about the XML. I have a mapping (for each of the
> 7 patterns) file that describes what database I need, what DB table I
> need, and what data in the incoming XML maps to the fields in the
> table.
>
> This works brilliantly and it means that any future project can use it
> with no modification. All I have to do is create a mapping file.
> Another benefit is that if the DB or the incoming XML changes, all I
> have to do is modify the mapping file and not have to re-compile the
> application. (I have to use SQL Client to connect tot he DB, as to
> work with Linq, I have to know the table structure and of course, the
> webservice can't know the DB structure).
>
> Anyhow, the problem I have is that some information that is required
> in the table has to come from other areas of the database. For
> example, I have an ID number come in the XML. This ID number belongs
> to a person, but is not his ID in the database. However, the DB will
> know the ID as it is assigned to that person. The problem is that this
> particular ID can be re-assigned at any time.
>
> So, my thoughts are to extend the DB tables (the ones I am mapping to)
> to contain the persons DB ID rather than the incoming ID. However, as
> I don't know the db structure from the webservice, I can't really
> collect it. So, my thoughts are to some how have the web service have
> a hook of some sort into a 'customer specific' function. The customer
> specific function will be delivered as an add-on.
>
> So, my web service should connect to the customer specific function to
> do any jobs the customer requires to the data.
>
> How should I write this connection? I want to somehow extend the
> generic web service without the web service actually knowing what the
> customer function does.
>
> Thanks for any advice you can offer.
>

--
Jesse Houwing
jesse.houwing at sogeti.nl


 
Reply With Quote
 
David
Guest
Posts: n/a
 
      11th Apr 2009
This is only a small application (about 5 weeks development time) and
biztalk would be overkill for it. (I don't know what biztalk can offer, but
looking at the features, is way too much for my simple application, and
probably will blow the budget out of the water).

All I am looking for is a simple way to be able to add customer specific
data to a database that won't have any effect on my generic data handler.

The way I am thinking is to create a new class that is customer specific,
but that the generic handler must pass specific information (for example,
table name, connection string etc.) and my class can either do nothing or do
the customer specific actions.

If I create the class in a seperate project, I should be able to simply copy
the customer specific DLL, without having to handle the data handler.

Does that sound like it will work or does the calling system (my data
handler) need to know specific information about the class.

Also, another question... If I can make it work as I am suggesting here, is
there any way that I can make a 'template' that appears in the visual studio
new project dialog?

Thanks.
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available


"Jesse Houwing" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello David,
>
> This sounds so much like a problem where Biztalk would be the ideal
> solution... have you looked at its features?
>
> Jesse
>
>> Hi all,
>>
>> Part of my current project brief is to create certain things to be as
>> flexible as possible for new (unknown) projects down the line.
>>
>> I have done quite a bit on the way...
>>
>> For example, I was asked to be able to receive files by email (POP3 or
>> SMTP). This now (after a lot of struggling) works.
>>
>> The email handler will then push the attached files to a web service.
>> The reason I have done it this way is that in the future, the email
>> handler could potentially be taken out of the equation and the sender
>> connect directly to the web service.
>>
>> One of the files coming in is an XML file. Basically, to keep it as
>> flexible as possible, all I know about the XML is that it follows a
>> set pattern, but the contents will be variable (for example, in the
>> current project, I can receive 7 different patterns of xml. Imagine it
>> as an excel sheet, with different column names at the top)
>>
>> So, as I know what each of the 7 patterns look like, I can create a
>> mapping to the database. The webservice knows nothing about the
>> database and nothing about the XML. I have a mapping (for each of the
>> 7 patterns) file that describes what database I need, what DB table I
>> need, and what data in the incoming XML maps to the fields in the
>> table.
>>
>> This works brilliantly and it means that any future project can use it
>> with no modification. All I have to do is create a mapping file.
>> Another benefit is that if the DB or the incoming XML changes, all I
>> have to do is modify the mapping file and not have to re-compile the
>> application. (I have to use SQL Client to connect tot he DB, as to
>> work with Linq, I have to know the table structure and of course, the
>> webservice can't know the DB structure).
>>
>> Anyhow, the problem I have is that some information that is required
>> in the table has to come from other areas of the database. For
>> example, I have an ID number come in the XML. This ID number belongs
>> to a person, but is not his ID in the database. However, the DB will
>> know the ID as it is assigned to that person. The problem is that this
>> particular ID can be re-assigned at any time.
>>
>> So, my thoughts are to extend the DB tables (the ones I am mapping to)
>> to contain the persons DB ID rather than the incoming ID. However, as
>> I don't know the db structure from the webservice, I can't really
>> collect it. So, my thoughts are to some how have the web service have
>> a hook of some sort into a 'customer specific' function. The customer
>> specific function will be delivered as an add-on.
>>
>> So, my web service should connect to the customer specific function to
>> do any jobs the customer requires to the data.
>>
>> How should I write this connection? I want to somehow extend the
>> generic web service without the web service actually knowing what the
>> customer function does.
>>
>> Thanks for any advice you can offer.
>>

> --
> Jesse Houwing
> jesse.houwing at sogeti.nl
>
>



 
Reply With Quote
 
Jesse Houwing
Guest
Posts: n/a
 
      11th Apr 2009
Hello David,

> Also, another question... If I can make it work as I am suggesting
> here, is there any way that I can make a 'template' that appears in
> the visual studio new project dialog?


Look at the Visual Studio SDK (search ms download site), all the information
to create template projects is in there.

--
Jesse Houwing
jesse.houwing at sogeti.nl


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application Design vovan Microsoft VB .NET 4 18th Mar 2008 06:34 AM
Basic design question for a distributed application - How to access application's data JB Microsoft VB .NET 4 31st Aug 2007 07:39 PM
Please recommend book about design patterns for server application\distrubuted application Julia Microsoft C# .NET 2 11th Dec 2004 01:37 AM
Design Issue: Separating Application Security Model from the Application (Custom or User) Controls Earl Teigrob Microsoft ASP .NET 3 10th Jun 2004 02:56 AM
Application Design Terry Roberts Microsoft Access Database Table Design 1 4th Mar 2004 02:54 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:48 AM.