Search Results

Search found 25123 results on 1005 pages for 'domain model'.

Page 84/1005 | < Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >

  • To identify the classes for uml diagrams?

    - by user106535
    I want to implement a software engineering project based on "crime management system". The main modules are: visitors, users, administrator. The main events that are taking place are: registration, report complaint, report crime, report most wanted, view status of reported crime. So could you please help me to identify the classes that are to be used in this project and help me to draw the class diagram?

    Read the article

  • Ubiquitous Language and Custom types

    - by EdvRusj
    Note that my question is referring to those attributes that even on their own already represent a concept ( ie on their own provide a cohesive meaning ). Thus such attribute needs no additional functional support and as such is self-contained. I'm also well-aware that even with self-contained attributes the custom types may prove beneficial ( for example, they give the ability to add new behavior later, when business requirements change ). Thus, my question focuses only on whether custom types for self-contained attributes really enrich Ubiquitous Language UL a) I've read that in most cases, even simple, self-contained attributes should have custom, more descriptive types rather than basic value types ( double, string ... ), because among other things, descriptive types add to the UL, while the use of basic types instead weakens the language. I understand the importance of UL, but how does having a basic type for a self-contained attribute weaken the language, since with self-contained attributes the name of the attribute already adequately describes the concept and thus contributes to the UL vocabulary? For example, the term person_age already adequately explains the concept of quantifying the number of years a person has: class Person { string person_age; } so what could we possibly gain by also introducing the term ThingAge to the UL: class person { ThingAge person_age; } thanks

    Read the article

  • Applying DDD principles in a RESTish web service

    - by Andy
    I am developing an RESTish web service. I think I got the idea of the difference between aggregation and composition. Aggregation does not enforce lifecycle/scope on the objects it references. Composition does enforce lifecycle/scope on the objects it contain/own. If I delete a composite object then all the objects it contain/own are deleted as well, while the deleting an aggregate root does not delete referenced objects. 1) If it is true that deleting aggregate roots does not necessary delete referenced objects, what sense does it make to not have a repository for the references objects? Or are aggregate roots as a term referring to what is known as composite object? 2) When you create an web service you will have multiple endpoints, in my case I have one entity Book and another named Comment. It does not make sense to leave the comments in my application if the book is deleted. Therefore, book is a composite object. I guess I should not have a repository for comments since that would break the enforcement of lifecycle and rules that the book class may have. However I have URL such as (examples only): GET /books/1/comments POST /books/1/comments Now, if I do not have a repository for comments, does that mean I have to load the book object and then return the referenced comments? Am I allowed to return a list of Comment entities from the BookRepository, does that make sense? The repository for Book may eventually become rather big with all sorts of methods. Am I allowed to write JPQL (JPA queries) that targets comments and not books inside the repository? What about pagination and filtering of comments. When adding a new comment triggered by the POST endpoint, do you need to load the book, add the comment to the book, and then update the whole book object? What I am currently doing is having a own CommentRepository, even though the comments are deleted with the book. I could need some direction on how to do it correct. Since you are exposing not only root objects in RESTish services I wonder how to handle this at the backend. I am using Hibernate and Spring.

    Read the article

  • Should this code/logic be included in Business Objects class or a separate class?

    - by aspdotnetuser
    I have created a small application which has a three tier architecture and I have business object classes to represent entities such as User, Orders, UserType etc. In these classes I have methods that are executed when the Constuctor method of, for example, User is called. These methods perform calculations and generate details that setup data for attributes that are part of each User object. Here is the structure for the project in Visual Studio: Here is some code from the business object class User.cs: Public Class User { public string Name { get; set; } public int RandomNumber { get; set; } etc public User { Name = GetName(); RandomNumber = GetRandomNumber(); } public string GetName() { .... return name; } public int GetRandomNumber() { ... return randomNumber; } } Should this logic be included in the Business Object classes or should it be included in a Utilities class of some kind? Or in the business rules?

    Read the article

  • Creating User Generated Subdomains

    - by nicks451
    Hi there, The company I work for is close to being finished with our first web app and we recently made the decision to offer hosting for our smaller customers. (We provide software to lending companies and our larger customers are required to buy redundant servers to host their application). What we are trying to work out right now is how to create user generated subdomains that will hold a new instance of the software. So a user will be able to sign up and say that the company name is XYZ Credit once they click on the create account button a url of xyzcredit.ourcompanyname.com is created and the user is redirected to it. The servers that we want to use are running CentOS 5.5 and Virtualmin 3.83. Thank you for your help, Nick

    Read the article

  • How to hide website's real address

    - by Nick
    I'm building a website for public use. It's a sharing website - everyone is allowed to download specific content, but I want to make sure nobody knows where all the files are kept, so I've decided to use URL Forwarding, e.g. when someone visits fakesite.com, it returns realsite.com without revealing/redirecting to realsite.com. Question: I don't know how to make this work. Please help me by explaining how to use URL Forwarding! Thanks!

    Read the article

  • Repository query conditions, dependencies and DRY

    - by vFragosop
    To keep it simple, let's suppose an application which has Accounts and Users. Each account may have any number of users. There's also 3 consumers of UserRepository: An admin interface which may list all users Public front-end which may list all users An account authenticated API which should only list it's own users Assuming UserRepository is something like this: class UsersRepository extends DatabaseAbstraction { private function query() { return $this->database()->select('users.*'); } public function getAll() { return $this->query()->exec(); } // IMPORTANT: // Tons of other methods for searching, filtering, // joining of other tables, ordering and such... } Keeping in mind the comment above, and the necessity to abstract user querying conditions, How should I handle querying of users filtering by account_id? I can picture three possible roads: 1. Should I create an AccountUsersRepository? class AccountUsersRepository extends UserRepository { public function __construct(Account $account) { $this->account = $account; } private function query() { return parent::query() ->where('account_id', '=', $this->account->id); } } This has the advantage of reducing the duplication of UsersRepository methods, but doesn't quite fit into anything I've read about DDD so far (I'm rookie by the way) 2. Should I put it as a method on AccountsRepository? class AccountsRepository extends DatabaseAbstraction { public function getAccountUsers(Account $account) { return $this->database() ->select('users.*') ->where('account_id', '=', $account->id) ->exec(); } } This requires the duplication of all UserRepository methods and may need another UserQuery layer, that implements those querying logic on chainable way. 3. Should I query UserRepository from within my account entity? class Account extends Entity { public function getUsers() { return UserRepository::findByAccountId($this->id); } } This feels more like an aggregate root for me, but introduces dependency of UserRepository on Account entity, which may violate a few principles. 4. Or am I missing the point completely? Maybe there's an even better solution? Footnotes: Besides permissions being a Service concern, in my understanding, they shouldn't implement SQL query but leave that to repositories since those may not even be SQL driven.

    Read the article

  • pls help to log back in to FB with an existing profile [closed]

    - by Katalin Glegyák
    Dear to Whom it may concern on Facebook, My name is Katalin Glegyák. I have had an account with an email: [email protected], even though I do not use that email anymore. Someone wanted to hack my account, so I changed password to a pretty complicated one, which I could not remember..(I know:)) I needed to prove my identity by typing in 3 codes that were sent to 3 friends on fb. I did it. Fb told me to come back in one day. I did so. But this is the message I keep getting: "We're sorry. The email you used to start the account recovery process is already in use. Please restart the process with a new email address.". I really do not want to log back in again with a new subscribtion. I already have 600 ppl who I know from places, and I have certain important messages also...Pls pls..help me..... Thank you very much, Merry Xmas, Kate Glegyák ([email protected])

    Read the article

  • MVC Dropdown List isn't binding to the model.

    - by Rod McLeay
    Hi, I am trying set up a simple dropdown list but I dont seem to be able to get it to bind to the Model. I am using Asp.Net MVC and nhibernate. My dropdown list is declared like so: <%= Html.DropDownListFor(model => model.Project, (IEnumerable<SelectListItem>)ViewData["Projects"], " -- Select -- ", new { name = "Project" })%> I set up the select list like so: ViewData["Projects"] = new SelectList(projectRepository.GetAll(), "EntityGUID", "Name", editEntity.Project); This seems to bind the select list to the Dropdown fine, but the SelectedValue is not set. it shows up as the default --- Select --- Also when I save this data, the dropdown does not bind to the model, I have to manually set the object like so to save it: entity.Project = projectRepository.GetById(new Guid(Request["Project"].ToString())); I believe I have take the correct messures to have this item bind directly to my model. Is there something I am missing here? Many thanks for your time, Rod

    Read the article

  • MVC map to nullable bool in model

    - by fearofawhackplanet
    With a view model containing the field: public bool? IsDefault { get; set; } I get an error when trying to map in the view: <%= Html.CheckBoxFor(model => model.IsDefault) %> Cannot implicitly convert type 'bool?' to 'bool'. An explicit conversion exists (are you missing a cast?) I've tried casting, and using .Value and neither worked. Note the behaviour I would like is that submitting the form should set IsDefault in the model to true or false. A value of null simply means that the model has not been populated.

    Read the article

  • Android - Convert Color Resource to Color in Domain Object

    - by Steve
    I have a domain object, where I created a method to return a text color based on the internal state of the domain object. I have defined the colors in a color.xml file as resources. The problem I have now, is that I would like to return a Color object instead of a resource ID from the domain object method. This way I can set the text color of a TextView by just calling textView.setTextColor(domainObj.getTextColor()) since it expects a Color object and not a resource ID. Currently, in an Activity, I can call getResources().getColor(domainObj.getTextColorResource()) to convert a resource ID to a color, but I would like this done in the domain object and I am not sure how I would do this when I do not have access to the getResources method. Are there any cleaner options than passing in a Resource object into the method, or domain object? Thanks

    Read the article

  • Entity Framework v4 examples and tutorials of conceptual model mapping

    - by Rody van Sambeek
    In an application I'm writing I have a fairly complicated Database model. I'd like to use EF4 to map this to a whole lot nicer conceptual model. However all the tutorials I've read are with samples of 2 or 3 tables which all map 1 on 1 to the conceptual model. I'd like to learn how to correctly map the database model to a different conceptual model using VS 2010. However I can't find any good tutorials or (preferabally) instruction video's. Somebody got any tips, links or even books?

    Read the article

  • Doubt about django model API

    - by Clash
    Hello guys! So, here is what I want to do. I have a model Staff, that has a foreign key to the User model. I also have a model Match that has a foreign key to the User model. I want to select how much Matches every Staff has. I don't know how to do that, so far I only got it working for the User model. From Staff, it will not allow to annonate Match. This is what is working right now User.objects.annotate(ammount=Count("match")).filter(Q(ammount__gt=0)).order_by("ammount") And this is what I wanted to do Staff.objects.annotate(ammount=Count("match")).filter(Q(ammount__gt=0)).order_by("ammount") And by the way, is there any way to filter the matches? I want to filter the matches by a certain column. Thanks a lot in advance!

    Read the article

  • Handling undo and edit flag on window with several model objects

    - by Rui Pacheco
    Hi, I've a window that will hold several instances of a model object, listed in a table. The model object is updated using a text view. What is the best way to keep the edit flag and undo manager in synch with the content of the different model objects? I'm thinking creating an instance of the undo manager on the model object and manually set the undo manager for the text view every time the user choses a new model object. Does the undo manager also handle the edited flag?

    Read the article

  • Two Tables Serving as one Model in Rails

    - by matsko
    Is is possible in rails to setup on model which is dependant on a join from two tables? This would mean that for the the model record to be found/updated/destroyed there would need to be both records in both database tables linked together in a join. The model would just be all the columns of both tables wrapped together which may then be used for the forms and so on. This way when the model gets created/updated it is just one form variable hash that gets applied to the model? Is this possible in Rails 2 or 3?

    Read the article

  • ASP.NET MVC - Disable Html Helper control using boolean value from Model

    - by The Matt
    I am outputting a textbox to the page using the Html helpers. I want to add the disabled attribute dynamically based on whether or not a boolean value in my model is true or false. My model has a method that returns a boolean value: <% =Model.IsMyTextboxEnabled() %> I currently render the textbox like follows, but I want to now enabled or disable it: <% =Html.TextBox("MyTextbox", Model.MyValuenew { id = "MyTextbox", @class = "MyClass" })%> If the return value of Model.IsMyTextboxEnabled() == true I want the following to be output: <input class="MyClass" id="MyTextbox" name="MyTextbox" type="text" value="" /> If it == false, I want it to output as: <input class="MyClass" id="MyTextbox" name="MyTextbox" type="text" value="" disabled /> What is the cleanest way to do this?

    Read the article

  • .htaccess rewrite for all but domain itself to a subdirectory

    - by romant
    Hi, There exists a blog at domain.com I wish to do a 301 redirect on anything that is after domain.com/[category/[post-name] to domain.com/blog/[category]/[post-name] The key here is when someone hits domain.com they just stay there. Only if there's any reference to posts within domain.com that I wish for the redirect to work. Will hold this for at most 6 months, until SEO settles, and then remove the redirect. What is the best way of achieving this with .htaccess ? The current one is as follows: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> Any help is appreciated. Thank you.

    Read the article

  • Parsing html for domain links

    - by Hallik
    I have a script that parses an html page for all the links within it. I am getting all of them fine, but I have a list of domains I want to compare it against. So a sample list contains list=['www.domain.com', 'sub.domain.com'] But I may have a list of links that look like http://domain.com http://sub.domain.com/some/other/page I can strip off the http:// just fine, but in the two example links I just posted, they both should match. The first I would like to match against the www.domain.com, and the second, I would like to match against the subdomain in the list. Right now I am using url2lib for parsing the html. What are my options in completely this task?

    Read the article

  • Presta Shop Switching Domain Issue

    - by Hammad Khalid
    I have a website made on Presta Shop CMS. I had it on my trial server. The installation and everything. It works and runs fine. I then copied (using FTP) every file from my trial server to the main domain. I did not install it on the main domain (bought from network solutions), but copied everything there. The issue is when i hit the main domain, it somewhat redirects me back to the trial server. I have checked and changed many of the default values. and many values in the database. But still havent had luck. Also made changes in the .htaccess file, still without any luck. I do not want to go through the installation process again on my main domain. You can check the site (main domain :- www.myworld-myhome.com, it will redirect you to hrm.com/esol/ )

    Read the article

  • Can I bind multiple forms to a single model using the default model binder?

    - by MedicineMan
    I have a complex page with several forms on it. The page is divided into sections, and each section has a continue button on it. The page is bound to a pageViewModel, each section addresses a different set of properties on the model. The continue button makes an ajax call to the controller, and the model binder binds it appropriately to the appropriate sections of the model. The section is refreshed appropriately. Finally, I would like to have a save button at the bottom of the page that takes all the forms, and binds all of the forms to the model. The model, at this point has all of the properties filled out, and can be processed accordingly. Can I accomplish this by some ASP MVC magic?

    Read the article

  • Quering distinct values throught related model

    - by matheus.emm
    Hi! I have a simple one-to-many (models.ForeignKey) relationship between two of my model classes: class TeacherAssignment(models.Model): # ... some fields year = models.CharField(max_length=4) class LessonPlan(models.Model): teacher_assignment = models.ForeignKey(TeacherAssignment) # ... other fields I'd like to query my database to get the set of distinct years of TeacherAssignments related to at least one LessonPlan. I'm able to get this set using Django query API if I ignore the relation to LessonPlan: class TeacherAssignment(models.Model): # ... model's fields def get_years(self): year_values = self.objects.all().values_list('year').distinct().order_by('-year') return [yv[0] for yv in year_values if len(yv[0]) == 4] Unfortunately I don't know how to express the condition that the TeacherAssignment must be related to at least one LessonPlan. Any ideas how I'd be able to write the query? Thanks in advance.

    Read the article

  • asp.net mvc custom model binding in an update entity scenario

    - by mctayl
    Hi I have a question about model binding. Imagine you have an existing database entity displayed in a form and you'd like to edit some details, some properties eg createddate etc are not bound to the form, during model binding, these properties are not assigned to the model as they are not on the http post data or querystrong etc, hence their properties are null. In my controller method for update , Id just like to do public ActionResult Update( Entity ent) { //Save changes to db } but as some properties are null in ent, they override the existing database fields which are not part of the form post data, What is the correct way to handle this? Ive tried hidden fields to hold the data, but model binding does not seem to assign hidden fields to the model. Any suggestions would be appreciated

    Read the article

  • Configuration and Model-View

    - by HH
    I am using the Model-View pattern on a small application I'm writing. Here's the scenario: The model maintains a list of directories from where it can extract the data that it needs. The View has a Configuration or a Setting dialog where the user can modify this list of directories (the dialog has a JList displaying the list in addition to add and remove buttons). I need some advice from the community: The View needs to communicate these changes to the model. I thought first of adding to the model these methods: addDirectory() and removeDirectory(). But I am trying to limit the number of methods (or channels) that the View can use to communicate with and manipulate the model. Is there any good practice for this? Thank you.

    Read the article

  • Passing domain name to PayPal

    - by ilhan
    I'm trying to sell something to domain owners. I need to know their domain names. Before the payment procedure I'll ask their domain names in my web site, I'll store the data in the cookies or the url, then I want to pass the data (domain name) to the PayPal so that I'll know who paid for what domain name. I know PHP and HTML in advanced level but I don't know how to pass the data to PayPal. How I'll do that? Thanks in advance!

    Read the article

  • Reliably detect caller domain over cURL request?

    - by Utkanos
    OK so server-side security is not my forte. Basically, I'm building a service which users may use (via an SDK) only on the domain they stipulated when they signed up. The SDK calls my web service over cURL in PHP. Would I be right in thinking I cannot reliably detect the caller domain, i.e. enforce that it is the same domain they stipulated when signing up? cURL of course sends this over headers, but headers can always (?) be faked. Is there a better course of action to enforce domain for this sort of thing? (NB I'm already using an API key, too - it's just I wanted to restrict domain, too) Thanks in advance

    Read the article

< Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >