|
Rephrasing to be sure that I understand the question.
You have a class A which takes a set of parameters.
You have a class B which produces a set of parameters.
You want ideas on how to move the data from B to A.
If that is your question...
You use another class which contains the parameters. Call it C. Class B creates an instance of C and returns it. Then that is passed to A.
In terms of implementation of C there are various ways to do it depending on exactly what the parameters consist of. The easiest is to just use properties. A more complex implementation would use a Dictionary. A Dictionary can be used to implement a multi-level structure as well.
|
|
|
|
|
Hi all ...
My name : zidan
(( My skill ))
(flash actionscript = intermediate , c# = intermediate , php = beginner level , mysql = intermediate ,sqlserver = intermediate , ado.net = intermediate
,sqllite = intermediate ) developer .
My Weak area ( converting my idea into oops means creating classes and object even though i know the concept but sitll not able to implement this concept into my project
(( My problem ))
i don't have real team work experience and i dont have time all project i did so far all are normal once means i used function procedure ,, i
know the concept of oops But how to implement the concept in my real life project
i tried from 2 years to develop even small project but no one help me .. i read and download many books on design pattern and MVC and UML but still i didnt get it
i need a proper guidance since you people have lots of experience developing application i want to start building application based on oops concept please if you kindly
can help me ... in short i want to learn how to convert my project idea and wireframing to Classes and how to Relate those classes with each other .
i even gone through forums but they didn't acutely teach you how to implement oops from the start ( only partial help ) sometime i think it is a
secret people keep hiding even from other you wont find oops implementation even for small size project in books , video training .. i tried
a lot .. they only show theory with very simple example and then jump to the next point ..
(( My Request))
--> guide me how to architect any project in oops ...
i am doing Currently medium size project i am
working on it using ( C# 2005 , 2008 , Ado.net 3.5 or 2.0 , sqlserver 2005 , or 2008 ) i have knowledge in all these 3 areas .
- plus i did full study on this project since it is also for personal and public needs ( later when i publish it ) .
- the database design somewhat easy with little modification needed ..
- 80 % of this project is already done but i just used function procedure style not opps that means i am reusing only the functions but i want it to make it
in oops using MVC OOPs style . moreover i lost all data of this project because of my brother accidentally format the hard drive .
But later i spent 3 month working on the wire-framing work flow i even made it better the previous one with more options and features
** please **
i m ready to pay for the honest expert who is going to help ة on through out the project .. if any one would like to join my ( one person team )
he/she most welcome ... at the end all of us will gain experiences and name .. i m sure there many people have the same problem tht i had ... no loss ...
(( about this little project ))
it is Expenses Budget controller My father actually requested me if i can do this since he is writing his daily expenses in a notebook
i have seen many software that does the job but i didn't like their user interface and usability concept they make entering data long task complicated process .. so i decide to make a
better one considering ease of use , automation entry options , better UI Finally,,,,, of course i could go further explaining the project in details i have all UI and database and how it is going to
work documents but i want to see if you can take my hand and guide me .
you will see also
Thanks for this forum for opening their door and offering hands to guide us help us ...
I would appreciate your immediate attention to this ... please let me know what action you propose for me to take according to my above situation ..
Best Regard
Zaidan
|
|
|
|
|
capsulez wrote: secret people keep hiding even from other
Nope.
You can buy many books that show you how to paint. But that will not make you an artist.
The difference - experience.
And there is no way to teach it. Probably because it requires a great deal of knowledge. And often just patterns of thinking (not programming patterns) which one learns over time on how to learn/solve new problems.
But it does in fact help to just try. Even if you fail.
capsulez wrote: moreover i lost all data of this project because of my brother accidentally
format the hard drive .
You should learn about source control AND backups then.
You use both.
They complement each other and help to insure that loses are minimized.
|
|
|
|
|
I've been re-reading Arthur J. Riel's classic "Object-Oriented Design Heuristics."
One thing that I've found striking on this re-reading is how much Riel emphasizes the use of the mediator design pattern (though he doesn't refer to it as such). Specifically, it's heuristic 4.14:
"Objects which share lexical scope, should not have uses relationships between them."
What this means, basically, is that objects that exist at the same level of abstraction shouldn't be communicating with each other. Rather, they should be communicating with an object at a higher level of abstract which in turn takes the appropriate action and communicates any necessary info to the other objects at the lower level of abstraction, in other words, the mediator pattern.
(as an aside this heuristic conflicts somewhat with heuristic 4.13. Riel addresses this by suggesting the use of abstract classes, i.e. interfaces, as a means through which children communicate with their parents)
There are at least a couple of reasons for this heuristic. One, it promotes decoupling and reuse. If the objects at the same level of abstraction don't know about each other, they're more likely to be reuseable. Two, it lowers complexity. Instead of a many-to-many relationship between objects, you have a one-to-many, i.e. the mediator has a one-to-many relationship with its child objects. One-to-many relationships are easier to reason about and understand.
Following this heuristic, you can wind up with a layered approach in which each layer is made up of mediators. The child objects are in turn mediators to their child objects, and so on.
I like this idea in that it seems to strike a balance between a hyper object oriented approach in which objects are tangled together in a complex many-to-many web of connections and a strictly procedural approach in which nothing is connected. I'd never thought of mediator in this light before.
|
|
|
|
|
The use of the Mediator is a common technique in MVVM to provide cross-communication between ViewModels without requiring complex communication infrastructure. It's a great way to keep them decoupled.
|
|
|
|
|
Mediator use isn't strictly mandated to achieve the same thing.
Some alternatives
- Pass an interface.
- Refactor discoved common code into its own grouping.
|
|
|
|
|
Hi
I am working on a project to process three files...two CSVs and one XML. These files are being moved from a file share to a SQL Server database table using BizTalk. The xml file is being transformed into the same flat file format as the two flat files using a C# component in SSIS. Then, these flat files are processed by SSIS packages. There is a lot of business logic in the SSIS transformations. The SSIS packages also do several look-ups using linked servers. All lookups and transforms are done on a row-by-row basis (which is slow). Also, any errors that occur are put in a separate database table depending on the business object that causes the error (i.e. BusObj1_error, BusObj2_error, BusObj3_error).
Basically, I was hoping someone could suggest a better architecture that would improve performance, allow scalability and flexibility, and allow many developers works as a team on the same pieces of functionality.
E.g.
- Put validation rules in a db rather than hardcoded into SSIS.
- Instead of using different error tables, use a single error table with a errorTypeId FK to an ErrorType table.
- Migrate all transformations from SSIS C# so that multiple developers can work on different Business logic classes at same time.
Thanks
modified on Wednesday, August 3, 2011 5:28 AM
|
|
|
|
|
First steps when something is "slow".
Determine what the goal is to make it not "slow" (so are you looking for 10% or 20000% better.)
Second step is to determine why it is "slow" - specifically what parts make it slow.
Myself I would suspect SSIS and the linked sources.
Putting the raw data directly in the databae, in work tables, and then processing it there to produce the final result would probably be much faster.
|
|
|
|
|
Thanks jschell
What would you say is the ideal architecture for what I have described?
|
|
|
|
|
What I would say is that the "ideal" architecture depends on specific details that one can only learn by studying the business requirements and needs in depth.
|
|
|
|
|
F***ing ETL, whoever put the transform in ETL should be taken out and shot.
Load the data into a staging table that exactly reflects the source data, NO transforms, no data types, make all the fields varchar(###) big enough to service your data fields.
Now you have the data in a platform that is designed to manipulate data. Write a stored procedure that transforms the data from the staging table to your target table. This gives you a fast, repeatable process that you can manage in TSQL not some obscure data/row/field/column transform object in your ETL tool. If you don't have TSQL skills then hire someone who does, they are not uncommon.
BizTalk, and every other transform tool I have ever had to use are garbage, I can write a bulk copy and stored procedure process that will out perform them every time. The only tool that came close to performance equality has been Informatica that will cost you $100k+ to implement.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks for the response, Mycroft.
I would tend to agree with you on using SQL tables and procs.
|
|
|
|
|
Mycroft Holmes wrote: f***ing ETL, whoever put the transform in ETL should be taken out and shot.
LOL, Tell us how you really feel Not that I disagree, the tools I've seen in action make Access loook like a rockstar (tibco and something from oracle)
Common sense is admitting there is cause and effect and that you can exert some control over what you understand.
|
|
|
|
|
Given the example of an Invoice, where you have 2 distinct areas; a header and details.
Can someone shed some light on how I should design my classes to support this ?
Here is what I do now:
1) create a base class called, InvDetails
2) create a factory class call, InvDetailsFactory.
(The factory will be responsible for reading and updating the Invoice details)
3) create a base class called, InvHeader
4) create a factory class called InvHeaderFactory (same idea as above)
Should I create a single class, Invoice, which has 2 components: Header and a collection of Details ?
Your input is welcome and appreciated.
|
|
|
|
|
To be specific an invoice is a 'report'. Where a report is a static presentation of existing data in a preset form.
A better starting point is a order entry screen which would have a create customer screen and a order entry screen.
The first lets the operator enter name, address, billing address, etc. From this you have a data model object called 'customer'
The second lets an operator pick a customer (already created) and the add order items for the customer. From this you have data model objects for 'order' and 'item' (or call it 'order item' if you prefer.)
For an invoice you would then start with a order number. That allows you to get the order and from that you get the items and customer. You also need a 'form'. The form describes the layout of the invoice itself. For example the name and address could be on the left with the order number on the right.
|
|
|
|
|
My bad for using the term, Invoice. Maybe it was confusing. Let's go with the concept of an "Order Entry" screen (web page).
My question still stands: "Should I create a single class, which has 2 components; Header and a collection of Details?" Or
Should I just create 2 separate classes, one that stores and manipulates the Header data while the other represents the details ?
Just looking for some suggestions / ideas.
|
|
|
|
|
My previous example described it specifically in terms of an order entry screen.
Precluding the orders themselves, other informatin on the screen would come from 'order', 'customer' and/or inventory (where the data model for that has not yet been defined.)
|
|
|
|
|
I build my classes to reflect the data structure
Customer may have a collection of Order(s)
Order may have a collection of OrderItem(s)
An Invoice will have a Customer
An invoice will have a collection of OrderItem(s)
Each code block is a table and also a class
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Can the details exist outside of the master? If not then it is an internal class.
I would design it having a Master with the overriding details and a list of Detail objects. I'm not convinced you'll need a specialised factory for creating these items, they have relatively simple creation interfaces. I would however consider how the Master will create Detail objects
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
You have answered my question. I'm still working on other aspects of the application, so I haven't implemented my Master / Detail business objects yet.
Thanks again.
|
|
|
|
|
Hi,
I’ve been assigned a task on a subject I don’t really know... I wondered if some of you could enlighten or help me somehow.
We use ADFS to manage our application login process and one of our customers is using CAS to do the same thing and asked if we could use his tickets in our 'architecture' to authenticate users automatically.
While reading I found out I maybe could use SAML to communicate between those two servers, but it’s all I got far now. And I don't really figure out how to do so.
I don’t know if some of you already had to deal with this sort of situations, but some help would really be appreciated!
Thanks in advance!
|
|
|
|
|
First of all, I am not sure whether this is the right forum to ask this question. If not, could you please help me in choosing the right forum.
This may be a stupid idea, but I think it is better if I can develop this. I need some help to start this.
We are storing our source code in VSS which is in UK server. Inorder to work locally in India, we need to connect to VPN, then to VSS to get the latest version of the code, which is in VS.Net 2008. Now, while opening the solution and also for checkout and checkin the files , and also getting the latest version to VSS, it is taking 2.5 - 3 hrs everyday which eats most of our working time.
Is it possible to write a windows service which will connect automatically to VSS and download the source code to our local system every day. Obviously each person VSS id and pwd will be different, even though the path will be same. We can proivde this as input config.
If this is possible, please guide me how to start with this. Any articles or urls will be great.
Thanks in advance,
meeram395.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
meeram395 wrote: We are storing our source code in VSS which is in UK server. Inorder to work locally in India, we need to connect to VPN, then to VSS to get the latest version of the code, which is in VS.Net 2008. Now, while opening the solution and also for checkout and checkin the files , and also getting the latest version to VSS, it is taking 2.5 - 3 hrs everyday which eats most of our working time.
Is it possible to write a windows service which will connect automatically to VSS and download the source code to our local system every day. Obviously each person VSS id and pwd will be different, even though the path will be same. We can proivde this as input config.
A Windows-service usually runs under a different context than the user; does it have access to SourceSafe?
I'm using batch-files to achieve something similar. We've got Tortoise, and downloading the latest code from the repository can be done over the commandline;
TortoiseProc.exe /command:update /path:"c:\stuff\code\" /closeonend:1 When done, the batch-file proceeds to build and executes the unit-tests. Gets executed every day by the Windows Task Scheduler.
SourceSafe supports the same[^].
Bastard Programmer from Hell
|
|
|
|
|
Thank you for the reply. I was actually looking for a similar kind of functionality.
I will go through the same and come back to you.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|