|
That is a good site. Guess i need to spend lot of time on that...
GET STARTED Geek...
Keep DotNetting!!
GeekFromIndia
|
|
|
|
|
I wonder, why this forum is so Inactive?
We can make a good use of this platform.
Keep DotNetting!!
GeekFromIndia
|
|
|
|
|
|
If I am writing a DB app, I am going to have several parts to keep track of. Some are:
SQL setup files
C# code
other misc files
Now if I change my c# files so that it requires new SQL setup files, I have to manage the change in 2 places. What is the best way to implement deployment while at the same time keeping DB/app versions in sync when revising code?
I don't even know what to call this concept to google it.
I guess this leads to the question "What are people who are using c# using for a CVS?"
The next situation would be if the end user was going from a previously installed v1 to v2 with different table structure. Are there design patterns for an updater?
Any info is appreciated.
Cheers,
WT
modified on Friday, January 11, 2008 11:32:17 AM
|
|
|
|
|
Hello WT,
The situation you are describing is a very common situation in development. We all go through managing the changes to code and consolidation of these changes.
Here is a suggestion if you are referring to source control for developers:
For application code (C#), use a source control system. In my organization, I set up to use Microsoft Team Foundation Server. Basically, its pretty cool in that when developers make changes in the C# code, then the changes are automatically checked out and then they can check things in.
Other source control systems you can use can be Visual SourceSafe. Or you can go with a open source solution such as: SubVersion.
Now for SQL scripts(I assume that is what you mean). There are a few solutions out there which are add-ons to SQL 2005 to handle source control.
As far as deploying new SQL changes (which seems to be the core problem) to futher environments.
You can use a SQL examiner tool which would do a compare between DB1 and DB2 and then allow you to create a "change script". I use SQL Examiner: <a href="http://www.sqlaccessories.com/SQL_Examiner/">
</a>[<a href="http://www.sqlaccessories.com/SQL_Examiner/" target="_blank" title="New Window">^</a>]
I hope above is helpful for you.
Arsen
|
|
|
|
|
Yes! Thank you very much. I will update the thread with my results.
|
|
|
|
|
wjtaylor wrote: from a previously installed v1 to v2 with different table structure. Are there design patterns for an updater?
Have you ever been to any Patterns sits like Portland Pattern Repository or the Hillside Group[^]
Note: Hillside has a link to Portland Pattern Repository.
Data migration issues might prove to be the most difficult aspect of all your problems depending on the types of schema changes and data dependencies you are introducing.
|
|
|
|
|
Hi,
In my application design I’m stuck on the following problem:
I have an application that will both be web as well as WPF/WCF based. Both are essentially the same, only the platform is different. Both share the same database and both will be totally localized to currently 3 languages. The localization of the GUI parts of both apps will sit in resource files, localized data such as “countries” (France (English) vs Frankrijk (Dutch) will come from the database.
I have a data object layer (for example holding a Country object) which is fed from the database and sent either to the web app, or via WCF to the WPF app.
My question is, for known values such as gender (only two values) or media type (few vales such as image, video etc), where will I do the localization? Of course these values are saved in the database, but maybe it should be held in the resource files of the data-object layer. So that in my WPF app I can choose a gender, and not having to go to the database in order to get the localized value.
What would be the best place to localize enum kind of values?
Thanks,
Gidon
|
|
|
|
|
So I have this class, Apple. There can be many instances of Apple, but only one can be my favorite at any given time. So the question is how best to manage a mutually exclusive property on a collection of objects?
Here’s a potential solution but I don’t know if it’s bad form or not (the meat is in the property-set and uses the static FavoriteApple field).
<br />
public class Apple<br />
{<br />
private static Apple FavoriteApple;<br />
<br />
private bool isFavorite;<br />
<br />
public bool IsFavorite<br />
{<br />
get { return this.isFavorite; }<br />
<br />
set<br />
{<br />
this.isFavorite = value;<br />
<br />
if (value == true)<br />
{<br />
Apple.FavoriteApple.IsFavorite = false;<br />
Apple.FavoriteApple = this;<br />
}<br />
else<br />
{<br />
if (this == Apple.FavoriteApple) Apple.FavoriteApple = null;<br />
}<br />
}<br />
}<br />
}<br />
The question is about the proper use of properties. Is it reasonable to set a property on an instance of a class and have it affect the state of another instance? Intuitively this seems wrong. But how else can you handle the setting of an object property that is by design mutually exclusive amongst all instances of the class?
The most obvious alternative is to leave it to the programmer to somehow enforce the mutual exclusivity. This puts the burden on the programmer and opens up the potential for some serious bugs, but doesn’t do any fishy stuff behind the scenes. Everything is explicit.
Another solution is to remove the "IsFavorite" property from the Apple class all together and us a reference external to the Apple class to keep track of the "favorite" apple. The only problem with this is that if Apple instances are treated differently based on whether or not they are the "Favorite", then the reference to the "Favorite" apple has to be passed around with the Apple instances.
At any rate, the method I've illustrated here works, the only question is does it violate a best practice or coding principle by changing the state of one instance implicitly when changing the state of another instance explicitly.
Thoughts?
|
|
|
|
|
Why do you need an isFavourite member?
Just have your static Apple favourite member, and an IsFavourite property
get { return this == favourite; }
Then you can set the favourite apple to the instance that is your favourite. The code reflects the real world problem domain, which indicates its a good design.
|
|
|
|
|
The reason for the member is that the state must be remembered across sessions and you can't serialize a static member.
But your point is well taken. I may be approaching this the wrong way. Perhaps having the "IsFavorite" as a property of the class, there should simply be a separate Apple reference that is updated to refer to the current favorite apple.
Thanks for your response!
|
|
|
|
|
In that case your database will need a Person type to represent you, and a Person.FavouriteApple member
|
|
|
|
|
Hi,
I recently came across this term 'Service Oriented Architecture'. I would like to know more about it. Any tutorial or link would help.
Regards,
ap.
|
|
|
|
|
|
Do a simple google search.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
SOA is a interesting concept, yet it "technically" isn't anything new. Its really another type of distributed computing architecture environment.
Conceptually SOA was around since the 80's, but just recently (in past 4-5 years) the tools and technologies have become available to really use these concepts.
There are 2 types of SOAs:
True SOA
and
False SOA
Most people think that SOA is just a set of web services. That is "false SOA". It doesn't mean that is not SOA, it is SOA, but not utilizing all architecture concepts.
Designing a service-oriented-architecture requires designing the architecture from inception. During the design phase, one determines which components and features can become a web service. It is best to try to make as many features of the system a web service. Basically, creating another type of interface to the business logic.
Here are a few good books on this subject:
[^]
In summary:
SOA Is:
* An approach to information interoperability across diverse systems.
* Architecture style/concept
* Transformation to a business & IT
* The next Generation Architecture will constitute the third big era in the It industry's history.
* SOA uses interactive business components designed to be meanfulful, usable and useful across application or enterprise boundaries (integration + interoperability)
SOA is NOT:
* New
* A technology
* A Web service
* A specification
* A set of standards
* Code
* Just a hype or a buzz word
Good luck!
Arsen
|
|
|
|
|
I read your name as "Pay-Pal".
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
i try to make a crawler that crawls the web page
and retrieves the stock information from google (i.e)
in a google page contain stock infrmn,but i want
to fetch & display particular field infrmn.
but can't do it. so pl help me.
very urgent.
|
|
|
|
|
Have you and the guy below been busy doing something unsavoury so that you've missed your homework deadline?
|
|
|
|
|
Figure it out yourself.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Very easy... just by coding..
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
i try to make a crawler to fetch the webpage in php.
in a webpage,i want to display a particular field.
very urgent.help me.
sg
|
|
|
|
|
Figure it out yourself. This is a Microsoft/.NET/Visual Studio centric cite. You probably won't find much help with PHP here.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
My xml file stores some data about different types of shapes and I want to load only those shapes which are being display, if a Next button is clicked it displays a shape if clicked again displays another shape. A shapecontrol may have picturebox control so how can I separate the shape control from its data. I know that i have to look into MVC pattern and have read about it but can't really figure out how to put together to get the result i want.
Basially i want to build like Ms power points. If power point we can add differnt kidns of objects and can view there raw data like height,width. Basially, i think controls are separted from data. That's what i want to
|
|
|
|
|
Obviously I can't post a complete solution, I've worked on the equivalent of MS PowerPoint and it was years of work. In general I would say to separate controls from data start by forgetting about the controls. Just think of the data, how to store it, retrieve it, access it and structure it. Then think about the controls as something you do with the data. When you do that you'll suddenly find you need data you didn't think of before. Add that to your original list and start over with getting your data structures right. Only when you switch to thinking about the controls and find all the data you need is readily available from your containers in a fast and safe manner then start on the controls for real.
The trick, if there is one, to a GUI heavy application is to do as little as possible in the GUI code and as much as possible in the data layer.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|