Its hard to understand your question, because both the word "client" and "delegate" have lots of meanings. But I think I understand. You have a master-detail (one-to-many) relationship between clients and delegates, and you want to have a client object with a property that contains a collection of delegate objects. Each delegate object will have a property reference back to a client object. The simple solution is to use lazy-load properties. (Have the necessary properties, but only instantiate the actual objects the first time the properties are used). This prevents the "loop" scenario you mention. If it is a small .NET app, then you could consider using Castle ActiveRecord, which will do this for you. (Or any OR-Mapper will also do it).
Steven Campbell
Posts
-
Class Design Help
-
Object level isolation than lockingIt sounds like you are asking how to implement pessimistic locking. There are very simple ways of doing that, although most people agree that it is quite a user-unfriendly thing to do (but sometimes you have no choice). Basically, create a mutex on the server for the particular rule being edited, and deny edit access to that rule for other users until the mutex is released. The mutex can be anything - for example MS Office products create a file when you open a document for editing, and delete it when you are done.
-
Client / Server DesignYou are suggesting a forms application with 3 physical tiers (client, server, database)? That is appropriate if you want to scale to large amounts of clients, or if you have specific security concerns. Otherwise, you should be aware that it is more expensive to build than a simpler 2-tier arrangement. (You should still logically split the application into layers).
-
Data replication -
UPDATE: "Most Popular" list doesn't change ?? -
Is this bad practice?Rather than tying everything to the main form, a better solution may be to either * design each of these objects as Singletons[^], or * just use shared methods, so that you do not need a specific object instance.
-
Hide the command windowI have not tried this, but... There are
StandardError
,StandardInput
andStandardOutput
streams properties on aProcess
. If you were to assign your own streams to those properties, it should/could/may cause the window to not display.
-
Password store In Windows...Windows 95/98 used to store the password with some trivial encryption in a file in the windows directory, but anything later than that does not. As others have said, through the miracle of cryptographic hashing algorithms, it is not necessary to actually store a password in order to be able to verify it. Thus, NT/2000/XP/2003 only store password hashes, not actual passwords.
-
Cookies and winformI don't see why not. They are simply files, located in your user-profile. My IE ones are in
C:\Documents and Settings\%myusername%\Local Settings\Temporary Internet Files
. (Substitute your own username for %myusername%).
-
Is this how MemoryStreams works?A memorystream does not go anywhere, except to memory, so I am unsure what you could mean by "send data in both directions". In any case, if you need to both read from a stream, and write to a stream, you would normally use 2 streams to do that.
-
Executing Scripts In SQL Server 2000Sorry to disappoint, but there is no built in versioning support in SQL Server, at any level. The best you can do is manually include comments at the start of your stored procedures, to indicate change history. There are some 3rd party tools that do database comparisons, and will be able to tell you when database structures are different. I cannot recommend anything specific though.
-
Executing Scripts In SQL Server 2000In
C:\Program Files\Microsoft SQL Server\80\Tools\Binn
you should fine a program calledosql.exe
. This is a command-line query running tool. Alternatively, many installation tools (Installshield, wise, windows installer) support some method of executing SQL on a server.
-
ReplicationNo, as far as I can figure, there are no good ones. I think the reason is that there are so many "ifs and buts", i.e. technique x works, but only if you structure your inserts this way, but if you have a BLOB column then you have to do it another way unless the planets are out of alignment, and then you have to apply the "jupiter" hotfix. Its just too complex to write about in any meaningful way. Unless you are willing to put many many hours into the learning effort, my best advice is to hire a consultant. As a bonus, you'll have someone to blame when things go wrong.
-
I don't know how to use CryptoStream class with Streamwriter and StreamreaderMy article on YEnc encoding[^] has a sample of this. Just scroll down to the 2 highlighted pieces of code. You can substitute any encoder (implementation of ICryptoTransform), instead of my YEnc one.
-
Stuck in a rutI find it fascinating to read technical blogs. You need a good RSS aggregator, so that you can organize them properly. Most bloggers post link of the blogs they read, so it is easy to find related blogs that you like. I read some non-technical ones too, because some people just have interesting lives, or good writing skills. My other hint is Safari Books Online[^]. Besides the obvious benefits of a nice reference library, I find I read lots of books I would never spend money on. There are some gems, and sometimes books that are highly recommended are real yawners. Either way, it costs me nothing extra to check them out. If you just want books, my favorite book for the last year or two has been Martin Fowlers PofEAA[^].
-
[Visual Source Safe] database x internet.. it's possible? -
Protect my system from hackingTry installing (and using) the Microsoft Baseline Security Analyzer[^]. Its free, and it gives you a good overview of potential security openings.
-
XML verus Traditional FilesThe primary advantages of XML are: * human-readable and editable * can be transformed into different formats using XSLT * can be queried using XPath expressions * well defined programmer APIs for editing existing data * .NET supports serializing objects to XML (and vice versa)
-
Encryption - how do I store a password/key in my App?Microsoft provides the DPAPI, which provides additional encryption services for this purpose. See http://www.obviex.com/samples/dpapi.aspx[^] for an example.
-
How do i Know someone really knows .NETGive them a notebook with VS.NET 2003 and access to the Internet, and ask them to write both a web application and a winforms application to query the pubs database for authors, and then show the books by the selected author. Give them an hour. They may not complete, but you should be able to evaluate their knowledge of how to do multi-tiered apps, and how well they know some aspects of .NET. A faker will not be able to do anything in an hour, and a guru will impress the hell out of you.