|
J4amieC wrote: I still hold that book in pretty high regard
Yeah, 'case the pretty things are the patterns themselves not the languages used.
J4amieC wrote: I ignored the first 100 pages as I was already very well versed in C# when I got it and so I simply use it sometimes as a reference book when using Design Patterns in my code
I think you must already have a good knowledge of at least one of the languages used, because you have to clearly understand the samples in order to fully appreciate the pattern itself.
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.
|
|
|
|
|
Hi karam chandra,
Just try this book from here.
regards,
Divyang Mithaiwala
Software Engineer
|
|
|
|
|
The same I suggested, comfortable!
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.
|
|
|
|
|
try the book "head first design pattern"...
Renu.K
|
|
|
|
|
Definately head first design patterns, quick and easy to pick up and learn from. Great prequel to more comprehensive books. Beware though, they prefer java as language of choice.
|
|
|
|
|
I've read a portion of the book and it has been great so far. Many fellow developers in my office rave about it too. All examples are in Java but that hasn't bothered any of us.
We are a purely MS shop that focuses almost exclusively on C# development (.Net 2003 and 2005) with some older code in C++ and some pourly written apps in VB6.
Pete
|
|
|
|
|
Hi karam chandra,
Finally i got the book from here.
It's free.
If u find useful.
regards,
Divyang Mithaiwala
Software Engineer
|
|
|
|
|
Hello,
I'm developing an application to capture and copy POP3 email then send
it to an email server. I need to do this before the traffic gets to the
user's email client application. In my investigation so far, it looks like my
options are to do this at the Winsock layer (with potential performance
implications), or in a kernel mode NDIS driver. I'm leaning to the latter
solution (perhaps by utilizing WinPcap).
Any advice or pointers to other resources would be appreciated.
Thanks.
Ken....
|
|
|
|
|
Ken,
This type of application would have to sit before or on the PoP3 Server in question to work as you may be aware of.
If PoP3 is using any type of encryption between other hops, then you may not be able to see anything but the IP header of any of the packets. This also goes for what type of encoding is being used on the data packets from the headers.
Definately using a NDIS driver will do the trick. Or a simplified way is to proxy the PoP3 Server if you have admin access to that server.
An example would be to change the port of the PoP3 server to 111. Your program would listen on port 110. This would allow you to do any pre-processing on any of the information coming in, then connect to the PoP3 on 111 and handoff what you need to passthrough.
You can readup on the Pop3 protocol at the W3C (World Wide Web Consorium).
If you cannot get access to the server, then accomplishing this can only be done at the packet level.
Hope this helps!
~ CodeDoctor ~
|
|
|
|
|
Thanks for the response. What I ended up doing was basically writing an email client to read the email from the server, instead of capturing the email as it goes up the stack to the user's email client. This approach solved alot of issues, including some you mentioned.
Ken....
|
|
|
|
|
I have a multi-level composite that I need to build. The composite is a classic composite pattern. Each level of the composite is a different concrete class that implements the same component interface. There is a one-to-many at each level. The objects at different levels of the composite are created based on data read from a database. I was considering using Builder to build the composite structure, but it seems that the director code would be too involved to do that. The director method that interfaces to the builder would have to have have a nested loop for each level in the composite (e.g., build these, now for each one of them, add these, now for each one of them, add these...). In addition, if I wanted to add or remove a layer, I would have to modify the director method that interfaces to the builder. My question is how can you use Builder and keep the director from becoming a huge nested loop that directs the building of each level of the composite?
-- modified at 13:13 Friday 5th January, 2007
|
|
|
|
|
Lockheed Bob wrote: The objects at different levels of the composite are created based on data read from a database.
Doesn't the data contain the nesting relationships?
led mike
|
|
|
|
|
I have the following situation:
I have an app that lives on an application server that will only be accessed via Terminal Services. Multiple users will be able to run this application. The actions of one user will affect the ability of other users to perform certain actions in their instance of the application.
Due to the nature of the application and file/registry access limitations of said server, I figure a service could be used as a marshal to implement that idea. The idea is that each user's app instance could communicate with the service to set/get access toggles (just two integers representing the object to be accessed, and a 1/0 toggle indicating whether or not access should be granted).
My questions are:
1) Can apps being run by multiple users via terminal services all access the service on the server? (I can't think of any reason they shouldn't be able to). If the answer to this is no, ignore the next few questions.
2) How do I find out if the service is even loaded from the application?
3) How would I exchange data with the service?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Seems to me there are a number of Windows-provided mechanisms you can use to synchronize access to things between intances of your application: events, timers, mutexes or semaphores.
As for how you could do interprocess communication, there're Named Pipes, sockets, or COM.
Ken....
|
|
|
|
|
I would choose either sockets or Pipes (pipes if you are not too good with sockets like me )
Actually once i worked on a service that watched a particular directory for command files (simple XML files) and performed the action specified in those XML files (works well if we only have one way communication), pretty lousy mechanism but worked beautifully through network shares
If you think you can than you can, if you think you can't you are right.
|
|
|
|
|
John Simmons / outlaw programmer wrote: 3) How would I exchange data with the service?
If both the service and the app are .NET you might look at using .NET Remoting.
led mike
|
|
|
|
|
Named pipes would probably be the easiest, or RPC/DCOM/Remoting, but sharing memory through mapped files and syncronizing with a mutex would have the best performance.
Using the GridView is like trying to explain to someone else how to move a third person's hands in order to tie your shoelaces for you.
-Chris Maunder
|
|
|
|
|
I am designing a *windows forms* application that displays data in a DataGridView.
The data is tabular, with about 12 columns, and with thousands of records.
The DataGridView data will be changed programmatically but it also can be changed by the user.
I want to be able to *locally persist* the DataGridView data from run to run; i.e., the PC may never connect to a remote database or may only occasionally connect.
I want to be able to programmatically delete old records to keep a ceiling on the number of records that share a thread ID.
My thoughts on where to locally persist the data are:
● INI file
● Windows Registry
● XML file
● Microsoft Access or other database
My thoughts on these:
● The INI file seems to be a nightmare to work with.
● The Windows Registry would be off-limits for some users and would probably quickly max out.
● The XML file seems to be favored in web forms rather than windows forms. Many XML controls and classes are in System.Web, which doesn't seem to be available in web forms.
● Microsoft Access probably would be cost-prohibitive, most of my users do not currently have it, its initial use of disk space seems to be high, and it can become bloated and need to be compacted. On the good side, having indexes and running SQL queries are both great. Maybe another database system would work if it has a small footprint, is easy to install, etc.
I'm hoping that someone can suggest a better option, give me some guidance, or give me a link to an implementation or example.
- Vkleo
|
|
|
|
|
Have a look at Smart Clients. This disconnected state is what they are designed for.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks for your suggestion Pete. I looked into Smart Clients and I see that they are the type of application I am designing, but they do not really specify a good way to pull off the local persistence of data. They just state that it would be cached, or would use a local database, but then give no further specifics. That leads me back to the initial thoughts on using XML or some (currently unknown to me) free database that's easy to install and hook up. I did find the topic of WinFS intriguing, but I was left with the impression that that would only have widespread availability years in the future.
- Vkleo
|
|
|
|
|
Try the Smart Client Offline Application Block[^].
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks for the link Pete!
Pete O`Hanlon wrote: Try the Smart Client Offline Application Block[^].
That document led me to find "SQL Server Compact Edition", whose final release is expected this month. It's compact and allows SQL. I think it's free.
I believe the document is going to be an excellent guide for me going forward.
Thanks again!
- Vkleo
|
|
|
|
|
If you're using a DataSource as (no pun intended) the data source to the DataGridView then any can't you use the DataSource.WriteXml and DataSource.ReadXml routines?
The controls then don't care whether they're bound to an SQL database or an (in this case) an xml file.
vkleo wrote: Many XML controls and classes are in System.Web, which doesn't seem to be available in web forms.
Can you explain this a bit futher?
I have no idea what I just said. But my intentions were sincere.
|
|
|
|
|
Ed, I misspoke in my initial post, so let me explain what I meant to say. What I should have said was that the web forms toolbox contains controls like XML and XMLDataSource but the windows forms toolbox does not contain any obvious XML controls. I was thinking that web forms had more XML capabilities than windows forms, but it looks to me like windows forms will have sufficient XML capabilities for my needs.
My windows form now has a DataGridView , whose data source is a BindingSource (auto-created by Visual Studio), whose data source is a DataSet . During Form_Load I use DataSet.ReadXml and I'll use DataSet.WriteXml whenever I want to save.
I see that the DataSet creates its own "XML Schema", so I discarded my original hand-coded "XML Schema".
One of my technical advisors told me that he worked at a place that used XML files and used XSLT to query/filter the XML data. I could query/filter the XML data the same way, or maybe instead query/filter the data in the DataGridView . At first glance I would prefer not to access the data in the DataGridView but I'll need to think for a little while about the trade-offs between these two ways.
Thanks for the hint Ed!
- Vkleo
|
|
|
|
|
vkleo wrote: I could query/filter the XML data the same way, or maybe instead query/filter the data in the DataGridView.
No need to do either I think. If you want to create different views that's what the DataView component's for, if you insert this into the "chain" between the DataSource and the binding source then you can write regular SQL statements to filter / query the data.
The datasource will also allow to you query the data using SQL if you want as well.
(As far as I knew anyway the ASP binding way of things is waaaaayy behind the Windows.Forms way of doing things (even for Xml), just because they have Xml in their title doesn't mean their better. The only downside I suppose is that the WinForms versions do everything so aren't that lean and mean).
I have no idea what I just said. But my intentions were sincere.
|
|
|
|