Do Ruby on Rails' ActiveRecord dynamic finders have a problem in that they don't explicitly tell clients about their interface?
Clients = client code or developers creating the client code. What uses the ActiveRecord. If you use the active record, is it clear from looking at the class what you can do with it, what it needs or how you ca...
Hi there.
I have a few questions for you wise people involving OO design with Interfaces and abstract base classes. Consider the following scenario:
I have an abstract bass class "DataObjectBase" and a derived class "UserDataObject." I also have an interface "IDataObject." The interface of course exposes all of the public methods an...
Is there a simple way to implement this, and if possible without instanciating an object :
interface I
{
static string GetClassName();
}
public class Helper
{
static void PrintClassName<T>() where T : I
{
Console.WriteLine(T.GetClassName());
}
}
...
I am designing an installer interface for a already written program. It is my first windows.form. I see three approaches to solving my "problem" of needing multiple "screens". I can add all the labels/buttons/interface, and then hide/show them at events. Or I can close and open a new windows? Or do I somehow load my next form into the wi...
Hello,
I (now more than ever) see developers write huge amounts of layers such as:
implementation PresentationLayer ->
interface IMyDTO ->
implementation MyDTO ->
interface IMyService ->
implementation MyService ->
interface IMyDomainRepository ->
i...
Hi, I have read the documentation and several websites on exactly how to do this, however Matlab does not seem to pick up the classes that I have added to the dynamic java class path. Nor do I use the right syntax to correctly construct the object.
I have an class HandDB and which to create an object of this type and invoke it's static ...
Hi all,
I'd like to achieve the glow effect on what I believe are UILabels (or maybe a custom control?) in this application called convert. I think the app looks pretty neat and I'm trying to achieve a similar effect for my own application
Any help?
Best regards
david
...
I have method in Class which is implementation of Interface. When I made it Explicit implementation I got compiler error
The modifier 'public' is not valid for this item
Why it is not allowed to have public for explicit interface implementation ?
...
Ok the great thing about programming to an interface is that it allows you to interchange specific classes as long as the new classes implement everything in that interface.
e.g. i program my dataSource object to an interface so i can change it between an xml reader and a sql database reader.
does this mean ideally every class should b...
Is it possible to declare a property in an interface without declaring the get- and set-methods for it? Something like:
IValue = interface
property value: double;
end;
I want to state that the implementor should have a property called value, returning a double, but I really don't care if it returns a private field or the result from...
I have an interface ISerializeDeserialize defined and some classes inheriting the generic interface. I also have some code generated assemblies using the CodeDomProvider which generates classes inherited from the same interface but implementing it with a specific Type.
What I want to achieve is getting a list of the generic implementati...
Im thinking of implementing a parser framework that would utilize a set of interfaces to make it easy to adapt to different types of data formats. I want to create structure around the way my controller object interacts with this parser and have come up with the following simple structure. I was hoping the community could provide any com...
I'm not sure what I'm wanting to do is even a good idea, but here's the problem anyway: I have MyClass which I want to implement two different types of the generic IEnumerable class, e.g.
public class MyClass : IEnumerable<KeyValuePair<string, string>>,
IEnumerable<KeyValuePair<MyEnum, string>>
Now, the problem...
OK, so it's easy to name an interface (or class for that matter) if you can easily think of a noun: User, Window, Database, Stream, etc.
What about an adjective or adjective concept? e.g. something that has a timestamp (HasTimestamp, Timestamped, Timestampable...?) or something that is tracked or watched (Trackable, IsTracked, Watchable...
In my ASP.NET website all calls into the data layer return entities as interfaces and the website does not need to know what the concrete type is. This works fine, but I have run into a problem when trying to store one of those types into the user Profile. My interface implements ISerializable, like the following:
public interface IInsu...
Hi,
I have a very big class with lots of methods, is it possible to build an interface from this class using resharper?
...
I am building an interface between two Oracle databases (A and B) on separate pieces of hardware. I am soliciting advice on the following options (or looking for other ideas) for referencing columns from database B in code on database A (I am using the %ROWTYPE feature in Oracle for all of my variables)
*Do it the hard way SCHEMA.TABLE...
I am implementing a simple plugin architecture in an application. The plugin requirements are defined using an interface (IPlugin) that is in a *.dll that is referenced by the application and the plugin. The application has a plugin manager (also in the same *.dll) which loads the plugins by looking for all the *.dll's in a plugins fol...
Hi all,
On startup, my program calls getifaddrs() to find out what network interfaces are available for link-local IPv6 multicasting. This works as far as it goes, but it doesn't handle the case where the set of available network interfaces changes after getifaddrs() has returned.
Is there some way for the OS to notify my program when...
Hi
I have an Interface as Contract. Now I'd like to define all Classes implementing the Interface as Serializable (XML).
What I'd like to do is something like follows:
public void DoSomethingWithElement( string element )
{
IElement e = DeserializeElement(element);
}
void SerializeElement(IElement e)
{
XmlSerializer xmlForma...