Jump to content
Xtreme .Net Talk

docflied

Members
  • Posts

    17
  • Joined

  • Last visited

About docflied

  • Birthday 08/08/1974

docflied's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hello all, Need your opinion, advice and orientation. Currently started a fresh new project involving .NET framework 4. One of the requirements is to show a GUI letting user doing this : - Pick a XSD1 and specify the root entity - Drawing entities and relations in a treeview fashion, one side - Pick another XSD2 and specify the root entity - Drawing entities and relations in a treeview fashion, onther side - User draw visual lines to create and manage mapping rules to be executed once a XSD1 compliant payload is processed in order to produce a XSD2 compliant one For those who know about MapForce, something like it but not so advanced. Trying to convince PL to rely on third party tools (like MapForce) but... in case we should do this from scratch, any experience feedback from someone whom have had to do something similar will be greatly appreciated. When I am saying from scratch, I mean using .NET advanced libraries or packages (EF ? May I use programatically one of several designers used by VS, ...) Thanks in advance
  2. Surely easier. In this case the opened connection to the database in the web service and the opened one in the winforms are kept duplicated, same thing for Log file stream. When u asked kind of shared information I didn't precised need of sharing same Database connection. Sorry for that. Guess no way to this without exchanging interprocesses as u mentioned. Hesistating between .Remoting and WCF. I think I'll first read more about all this stuff, cause I dont master context and AppDomain in .net but I think it should be similar patterns as Java Once again thank u, and hope u a very Happy New Year.
  3. Thank u for ur help. Shared data are : Data base connection string (String) Log path (String) Log verbosity (Enumeration) Ok a related question, assuming that the web service referencing the shared and GACed dll creates its own AppDomain (own sandbox) Is there a simple way to tell a .net application (winform or class library or another ASP.NET application) to run into the same AppDomain (joining the remote domain?)
  4. Hey everyone, Wish you merry Xmas and an excellent 2010 Well once again need ur help and advices to understand a tricky issue. I got a shared assembly (say SharedAssembly.dll) installed in the GAC, this assembly exposes a module (static class vb equivalent) called CustomSettings inluding some properties to set Log path, DataBase connection string and some other behavior stuff. Say u have a ASP.NET web service referecing this SharedAssembly.dll Say u have a .Net application referencing the web serivce and SharedAssemlbly.dll Before calling any web service method, the .Net application assign values to exposed and shared properties. Once the web service called and within it, obviously the effective referenced assembly is not the typically the same (shadow copy done by binding mechanism thought?) and all initialization done in the .net application before calling the web service is useless! Thought that is ASP.NET application dedicated AppDomain isolate the referenced dll. How may I work around this ? Allready passed a huge amount of time reading and reading, but can't find the best way to do this properly. Thank u for ur hêlp
  5. So in other words the ObsoleteAttribute behavior is quiet special and cannot be imitated? I thought there is some interface or class in a dedicated compiler services or dedicated visual studio assembly (dont know if it exists) that I would implement or inherit to create a "while-coding" side effect custom attribute, as ObsoleteAttribute does. Thank u for ur help.
  6. Hi everybody. I was wondering if any one had encoutered the need to create a custom .net attribute that acts like ObsoleteAttribute ? So lets suppose that this attribut is coded and is called MySpecialAttribute and lets say that its targeted for Methods only. What I need is that at the moment the coder will declare a sush attribute and while he is in IDE mode (visual studio only or other compiliant IDE) a special job is done with possible forced compiling error ? Example : <MySpecialAttribute()> _ Public Sub MyMethodToBeControled(ByVal Param1 As Object) ... End Sub In this case I want to check that arguments of the Sub MyMethodToBeControled meet some conditions (type or name) and if not raise a compiling error in the IDE like ObsoleteAttribut does. Any Idea from experts ?
  7. Seriously, dont whanna be bad with u... but those moments spent on brainstorming this kind of simple algorithm are very usefull... as far as I remember when I was student felt a priceless pleasure resolving this by my own. U should try to do it ur self. beleive me dude.
  8. Try the best algorithm for this : while (it wont work) { try again } :p
  9. Oh I am not an obstinate guy and agree almost your analyze of the problem. I am not expert in .net but got a solid experience in OOP (Java) and cant just imagine that a cleaner maner doesn't exist. As u said, my boss !! that's it. An time is missing as usually. Today my problem is solved by properties inspection and injection of a common and central method. Now I am on security matters to avoid other doing what I've done :) In all cases thank u all for ur advices, especially marble Read u soon, when I'll got another issue.
  10. No hacking here man... I've written the whole object model and what I am doing is actually guidance for future inheritance of future classes developped by foreign people. As I allready said all what I want is a "good" way (cause I agree that code injection smells bad) to detect any property getter call and do something before returning the result of this getter. The aim is to prepare objects without calling resource consuming processes. And only when thoses objects are "GETTED" and only if the are "GETTED" then i'll Load them. Let's say u have an object "CHILD" that read itself from database after u assigned some of its keys related properties. Then let's say u have an object "PARENT" onwning the "CHILD" object as a private member and exposing it with a property "getChild" When the parent is created and loaded, the child is supposed to be created and loaded also. Instead of doing that, I am creating and preparing (not loading) the child object within the parent creation process. And only when "someone" calls Parent.geChild and just before returning the associated private member I aim to really load the object. I really want to copy paste my code but I got discolsure obligations and code is classified (even if I sware there is no reason to)
  11. Sounds good. Yeah there is many stuff there try http://creators.xna.com/en-US/education/gettingstarted Else, in the Education menu u got starter kits with some simple games projects to download and play with TC
  12. Thank u for ur explanations. I am aware that I gave not enough details and my question is somehow ambigous. The first solution u indicated that's excatly what I am doing now, thus calling EnsureInitialized in each subclass property getter. For now it's OK. The problem will start when other developpers will code new classes subclassing my BaseClass. I have no guarantee that they will call EnsureInitialized in each property they'll code in this new SubClass. Got it? That's why my idea (my dream) was to detect in the BaseClass any getter call done using an instance of any futur or existing SubClass coded by anyone. I am on my way to end an alternative solution, hoping it will work even if I am sure it will imply performance decrease : Create a method in the base class that use Reflection to discover each property getter. Using DynamicMethod, IL and Emit to inject hooks for each getter and ensure calling the common needed logic. Reflection is nice, but when I can avoid it I dont hesitate in ordre to not get performance decreasing but sounds like in my case there is no other alternative (at least known alternative) Thank u again for ur help
  13. Ur right dude. When I created my first XNA game I started from scratch following msdn tutorials step by step. At the begining its a bit boring since it involve very simple mathematics but when digging in 3D as u expect it involved Matrices, 3D-Algorithms, Shadowing, Reflection and so on. It could be amazing to create your own simple "world simulator physics engine" MS Tutorials for XNA are really good since complexity grows up in pair with ur comprehension. Start with the first one after installing required (and free) tools (VS 2008 C# Express Studio and XNA assemblies)
  14. Seems like u need science (math & physics) guidance in ur projects to get fun. I suggest u trying Microsoft XNA Framework. U can create nice 3D games for Windows and XBOX using C#. Start with http://msdn.microsoft.com/en-us/aa937791.aspx TC
  15. First thank u for replying. Ok I'll try to be more explicit and more direct giving an example. Class MyBaseClass ... End Class Class MySubClassA Inherits MyBaseCLass Private mFieldA1 As Object Private mFieldA2 As Object ... Private mFieldAn As Object Property PropA1 As Object Get 'Need to place code here Return mFieldA1 End Get Set(ByVal value As String) mFieldA1 = value End Set End Property Property PropA2 As Object Get 'Need to place code here Return mFieldA2 End Get Set(ByVal value As String) mFieldA2 = value End Set End Property ... Property PropAn As Object Get 'Need to place code here Return mFieldAn End Get Set(ByVal value As String) mFieldAn = value End Set End Property End Class Another subclass Class MySubClassB Inherits MyBaseCLass Private mFieldB1 As Object Private mFieldB2 As Object ... Private mFieldBm As Object Property PropB1 As Object Get 'Need to place code here Return mFieldB1 End Get Set(ByVal value As String) mFieldB1 = value End Set End Property Property PropB2 As Object Get 'Need to place code here Return mFieldB2 End Get Set(ByVal value As String) mFieldB2 = value End Set End Property ... Property PropBm As Object Get 'Need to place code here Return mFieldAm End Get Set(ByVal value As String) mFieldBm = value End Set End Property End Class And so on ... For any subclass MySubClassC, MySubClassD What I need is to detect (event or delegate or any other solution) each time Prop<X><i>.getter is called and put this code in the base class. Something like : Class MyBaseClass ... Protected Sub GetterCalledEvent(....) 'Here I need to got a reference 'to the mField<X><i> wich will be returned 'in the getter just after this sub ends. End Sub End Class Really sorry for my first post. Hope I am clear this time. And to answer your question yes it is exactly what you wrote except that the code when detecting getter caller will be common and placed in the base class so any future subclass (written by someone else) will trigger implicitly the same detection and the same logic. Thanks in all cases
×
×
  • Create New...