|
Having been only introduced to it last night, I will tentatively suggest looking at WCF as a more focused, more current, alternative to COM+. Don't be misled by the Communications term, which tends to conceal its role as a services infrastructure.
Calling all South African developers! Your participation in this local dev community will be mutually beneficial, to you and us.
|
|
|
|
|
Interesting. I wasn't aware WCF was in that role. I have one of the Microsoft Press books on WCF sitting here that I haven't had a chance to go through. I'll have to look at that.
|
|
|
|
|
Well I'm not at all surprised that without complete requirements, which is not actually possible in text messaging, you can slightly miss the target, if indeed I have. More generally my point is that there is very little need to build your own Service these days. I see you are now looking at WCF, I haven't looked into that yet so I have no idea how it relates to my point of not needing to author your own hosting process.
In terms of reliability and scalability I would require a proven concrete reason to author my own service rather than use an existing hosting platform from the current Windows Server products. Keep in mind it's not because I am apprehensive about writing a service, I have authored so many services since NT4 that I can't even remember them all. Back in 2000 I lead a project that developed a proprietary application server ( long Dilbert story ) in Java so I have no fear of doing it but still, not now, not without a proof.
|
|
|
|
|
Fair enough. Most of my development has been with client/database development. This is my first non-superficial plunge into Windows services whether that be with Enterprise Services, WCF, et al.
|
|
|
|
|
I'm curious about...
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.
|
|
|
|
|
CPallini wrote: Did anyone ever implemented flyweight design pattern?
Yes
|
|
|
|
|
Could you, please, detail your experience? For instance, what are
(1) The kind of project requirements that made appealing that pattern.
(2) The design issues you faced.
Thank you in advance.
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.
|
|
|
|
|
CPallini wrote: (1) The kind of project requirements that made appealing that pattern.
Not normally a requirements based reason. All things are (or should be) traceable back to a requirement but the flyweight pattern is mainly about optimizing memory/resource usage, which is not a requirement that a software developer should need. A generalization of a design scenario is the system will need to use the same small number of items I very large number of times, potentially infinitely. Does that help?
CPallini wrote: (2) The design issues you faced.
None. It's a very simple design, all of the best ones are.... very simple.
|
|
|
|
|
led mike wrote: Does that help?
Yes.
Thanks a lot. I really appreciate your replies.
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.
|
|
|
|
|
I've never heard of it. What is it? Sounds like some kind of lightweight design approach.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Paul Conrad wrote: I've never heard of it. What is it? Sounds like some kind of lightweight design approach.
...for a large numbers of objects, see, for instance http://en.wikipedia.org/wiki/Flyweight_pattern[^]
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.
[my articles]
|
|
|
|
|
I´m trying to create a windows application that will be able to store data in a database. Both the application and the database have to be in one installation package and the end user has to be able to use the application correctly without the need to install anything else(database server,...). Can anyone help me with this? Which kind of database should I use?
I was thinkink about using MSSQL 2005 Exress Edition and then just attached the .mdf file to the application, but I´m not sure if this is the best solution. Is it possible to access and work with .mdf file on a computer, that does not have the MSSQL server installed?
Or what is the best solution for this problem?
cellardoor
|
|
|
|
|
SQL Server Compact Edition[^] is what you need. (Express still needs to be installed.) Compact is just a couple of dlls that let you use a single .sdf file as a database. Similar limits to Express (4gig db limit etc) - but it is also missing stored procs.
Then use this[^] to handle your data access and the whole data end of your application is done for you.
Your other option if you don't actually need the databasey features of a database is to use a prevalence mechanism[^] that stores plain .net objects for you.
|
|
|
|
|
Thank you, I´ll try the SQL Server Compact Edition.
cellardoor
|
|
|
|
|
|
I have a hierarchy of objects that share some attributes, e.g. both my parent Record and Column objects have a columnDelimiter property. I want this property on the Column object to default to the same property on the Record object, until specified on the Column object. What is the best way to go about this? I could give each Column a reference to the Record it belongs to, but this seems not quite right to me. My other option is to have the Record act as a ColumnFactory, setting the columnDelimiter value on each Column it creates, until a set accessor on Column optionally overrides that default value.
Calling all South African developers! Your participation in this local dev community will be mutually beneficial, to you and us.
|
|
|
|
|
I am having trouble understanding your problem. Can you provide a scenario where the column delimiter is different from the record delimiter?
|
|
|
|
|
No, maybe that was a bad example, but I'm trying to build in forward compatibility with SSIS, and their columns all define their own delimiters. However, my problem is not one of Column specified column delimiters and Record specified column delimiters; it is one of child objects 'inheriting' property values from their parents, until or unless the child object overrides the value.
I do have exactly the same requirement for individual Columns to have an option to quote their contents, which overrides the 'quote contents' option for the Record.
Calling all South African developers! Your participation in this local dev community will be mutually beneficial, to you and us.
|
|
|
|
|
Brady Kelly wrote: I'm trying to build in forward compatibility with SSIS
I don't know what that means.
Brady Kelly wrote: I do have exactly the same requirement for individual Columns to have an option to quote their contents, which overrides the 'quote contents' option for the Record.
Sorry, I just don't get it.
|
|
|
|
|
OK, Record is my parent object (not base object), and it has a collection of child Column objects. Record has a boolean property, QualifyText, which when set, surrounds string columns with a configured qualifying character. Column, a child object, also has a QualifyText property. If this property is set on a Column object, the export engine must use the QualifyText property set for that Column object. When the QualifyText property is null on a Column object, the export engine must use the value of the QualifyText property on the parent Record of a column.
Calling all South African developers! Your participation in this local dev community will be mutually beneficial, to you and us.
|
|
|
|
|
Brady, it's possible we are at an impasse on design fundamentals.
Perhaps I am having difficulty providing any suggestions of how to deal with your problem as you have framed it because I see a larger problem in your design. Things like your previous statement...
Brady Kelly wrote: I have a hierarchy of objects that share some attributes
... point to fundamental design flaws for me.
|
|
|
|
|
Mike, I think the problem is with my description, not my design. I am looking to implement something somebody likened to Ambient Properties[^]. If I don't specify a background colour for an edit control I place on a container, I would like that control to assume the background colour of its container. If don't specify a QualifyText flag for a Column, I want the consumer of the Column object to use the QualifyText flag of its parent, the Record. I want to keep this logic encapsulated in the code that defines Record or Column, not in the code that uses them. There may be more purist ways of doing this, but it is by no means an abominable design requirement.
Calling all South African developers! Your participation in this local dev community will be mutually beneficial, to you and us.
|
|
|
|
|
|
Thanks, I am finding them interesting, but have to continue tomorrow. It's now 23h40 here and I'm going home.
Calling all South African developers! Your participation in this local dev community will be mutually beneficial, to you and us.
|
|
|
|
|
Does that guy really advocate not using properties?
I think it's a bit bizzare as i rely on properties for injections via routes other than constructors. Sure they don't get used much at higher levels, but for primitive types they are essential. Generally tho, i can't agree.
I'm guessing the guy asking the questions is trying to implement something along the same lines as the VS designer with inherited attributes for defaults, whether or not its appropriate for his domain is another thing entirely.
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|