Jump to content
Xtreme .Net Talk

pas30339

Members
  • Posts

    24
  • Joined

  • Last visited

Everything posted by pas30339

  1. Scalability is all about the architecture. If a system is architected with scalability in mind and done so correctly it will scale. (Think SOA) Much depends upon how the client prioritizes their needs. You can have a system that is slower but will scale extremely well, but ti may take too long to build it. I think you're going to have to refer to either 3rd party (objective) comparisons or white papers from each community. Here is a recent article comparing .NET 2.0 and Java 1.5. It doesn't specifically address your question but it may help: http://www.bentuser.com/article.aspx?ID=323
  2. This should do the trick. http://support.microsoft.com/default.aspx?scid=kb;en-us;315291
  3. I suggest, in the event the .NET Framework is absent, you install it regardless of whether the user chooses to install the .NET application you are piggybacking. At some point or another the .NET Framework will need to be installed anyway so may as well have it over and done with.
  4. Don't suspend the page. That's bad design. make an asynchronous call to the DB and when the data returns populate your form. You can send asychronous calls to the server. The ability has been around for years but only recently has it caught on. Some people call the technology AJAX :"Asynchronous JavaScript and XML". Here's some reference material: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/lifewithoutrefresh.asp http://www.adaptivepath.com/publications/essays/archives/000385.php And to see it in action check out Google's "suggest" feature. http://www.google.com/webhp?complete=1&hl=en The suggestions are provided via an asychronous call to a server.
  5. Here's one major difference: PHP is loosely typed whereas all .NET languages are strongly typed. IMHO that alone is reason enough to use .NET. Also, development in .Net is significanly faster than in PHP - by orders of magnitude. This makes a HUGE difference if you're developing a large website. I've worked in PHP and .Net. The only way I'd work in PHP again is if someone paid me too. Why drive a Chevy if you can have a Mercedes? .Net simply outclasses PHP in every area.
  6. Also, check out this quick read about encryptiing your connection strings in your .config file. Better safe than sorry!! http://www.c-sharpcorner.com/Code/2003/May/SecureSiteWithASPNET2.asp
  7. What has been your experience in deploying MSDE with your applications? The MSDN documentation gives the impression it's pretty strait forward but I've heard nothing but horror stories from those that have actually done it. I ask because I need to deploy MSDE with an application I am developing and I'm just starting the research on packaging it with the installation.
  8. Well if the labels(s) are repeatedly updated then he needs to extend a label and override the label's OnPaint method with similar logic as that provided. When the label needs repainting call label.Invalidate() followed by label.Update() for an immediate repaint of the label. Invalidate() marks the control as dirty so it will be repainted when the next WM_PAINT message is sent. Update() sends a WM_PAINT message. At least I think that's what need to be done.
  9. Override the OnPaint method of the form: protected override void OnPaint(PaintEventArgs e) { SizeF len = new SizeF(); len = e.Graphics.MeasureString(this.label1.Text.Trim(),this.label1.Font); this.label1.Width = Convert.ToInt32(len.Width); base.OnPaint (e); }
  10. This will fire/raise the KeyPressEvent simulating the Enter key being pressed. private void FakeEnterKeyPress() { KeyPressEventArgs e= new KeyPressEventArgs(Convert.ToChar(13)); OnKeyPress(e); }
  11. It's not a one pager but O'Reilly has pocket reference books that are very handy. link
  12. A word of advice to those testing out CTP versions of the Framework. If you have the means either install on a Virtual PC or on a system that you can afford to fry.
  13. I've never worked with VB-6 but I do know that VB.Net is a paradigm shift compared to VB-6. VB.Net implements Object Oriented Programming, and one of the tenets of OOP is encapsulation. You use Public Properties to expose those items that you want to be able to manipulate. The 'set' key word is required by the compiler. You could create an accessor method to do the same thing but Properties is how such behavior is implemented in .Net. If you're creating a complex application then the way I described will work but it is not the best choice. In such a case you'd probably want to consider implementing the MVC design pattern.
  14. In Form2 create a Public Property. In the set{} block assign the value to the TextBox.Text property. public string TextBoxText { set{this.textBox1.Text = [color=Blue]value[/color];} }
  15. It appears you are correct. The Collection object you're familair with is in the Microsoft.VisualBasic namespace. 1 I was unaware of that. I've never worked with VB. And it has an Items property which can be indexed too. 2
  16. Well, this won't work: Collection c = new Collection() ; since the .Net Framework does not have a type 'Collection', but it does have a type Hashtable which belongs to the System.Collections namespace. A collection is a type of container, but you need to know the type of container you want to use. Simply saying 'give me a container' won't work but 'give me a hashtable' works.
  17. A Collection is a means of storing groups of objects or Types. Depending upon how you want to store and retrieve your objects determines the type of collection you use: A HashTable is a type of collection. Reference
  18. The abstract class NameObjectCollectionBase would allow you to create your own implementation. The key would be strings and the values objects. Reference
  19. Actually a Hashtable stores objects for both the keys and the values. You can't access the key via an index. You access the keys and the values via a DictionaryEntry object: Hashtable ht = new Hashtable(); MyTest mt1 = new MyTest(); mt1.localValue = "Test 1"; MyTest mt2 = new MyTest(); mt2.localValue = "Test 2"; MyTest mt3 = new MyTest(); mt3.localValue = "Test 3"; ht.Add("One", mt1); ht.Add("Two", mt2); ht.Add("Three", mt3); foreach( DictionaryEntry entry in ht ) { Console.WriteLine( entry.Key + " " + ((MyTest)entry.Value).localValue ); } // prints out // One Test 1 Three Test 3 Two Test 2
  20. SortedList does not support duplicate keys::MSDN If you can use strings then a NameValueCollection will work. It is a 1 to Many collection. MSDN
  21. It depends on the type of collection. The most straight forward is a Hashtable. You can also use a SortedList.
  22. Describe the scenario. Are you exiting the form when you leave the textbox? I'm thinking the Leave event is being raised at the textbox level and then the form level. You may also want to consider using the Validating event rather than the Leave event.
  23. One 'why' has to due with GUI's. The user performs an action on one form, and you want to update all controls that are interested in what the user did on an application wide basis. A value is changed in formA and a datagrid in formC recalculates it's totals based on the new value. The delegate acts as the bridge allowing communication from the object raising the event to objects interested in knowing about the event.
×
×
  • Create New...