Search Results

Search found 1004 results on 41 pages for 'layers'.

Page 27/41 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • How to evade writing a lot of repetitive code when mapping?

    - by JPCF
    I have a data access layer (DAL) using Entity Framework, and I want to use Automapper to communicate with upper layers. I will have to map data transfer objects (DTOs) to entities as the first operation on every method, process my inputs, then proceed to map from entities to DTOs. What would you do to skip writing this code? As an example, see this: //This is a common method in my DAL public CarDTO getCarByOwnerAndCreditStatus(OwnerDTO ownerDto, CreditDto creditDto) { //I want to automatize this code on all methods similar to this Mapper.CreateMap<OwnerDTO,Owner>(); Mapper.CreateMap<CreditDTO,Credit>(); Owner owner = Mapper.map(ownerDto); Owner credit = Mapper.map(creditDto) //... Some code processing the mapped DTOs //I want to automatize this code on all methods similar to this Mapper.CreateMap<Car,CarDTO>(); Car car = Mapper.map(ownedCar); return car; }

    Read the article

  • How does Photoshop (Or drawing programs) blit?

    - by user146780
    I'm getting ready to make a drawing application in Windows. I'm just wondering, do drawing programs have a memory bitmap which they lock, then set each pixel, then blit? I don't understand how Photoshop can move entire layers without lag or flicker without using hardware acceleration. Also in a program like Expression Design, I could have 200 shapes and move them around all at once with no lag. I'm really wondering how this can be done without GPU help. I don't think super efficient algorithms could justify that? Thanks

    Read the article

  • Where should I define Enums?

    - by Ciel
    Hi: I'm setting up a new app, with a Repository layer/assembly, a Services layer/assembly, and a UI assembly. So I end up with namespaces such as: App.UI App.Biz.Services App.Data.Repositories And then I have enums for the args that are used by all 3 layers. Only place that makes sense is to put them in the Cross cutting assembly. (define them in Data layer too low, as UI should have no direct ref to them, defined in Services, too high for Repository layer, which shouldn't be referencing upwards). But...which namespace in Common? Namespaces should mostly be used to define concerns, rather than Type... I've always used something like: namespace App.Common.Enums {...} but it's always felt a bit of a hack that works for me, but not well in a large org where everybody is generating Enums, and if we put them all in Enums folder it's going to make the code folder harder to understand later. Any suggestions?

    Read the article

  • In which layer should I join 2 entities together?

    - by William
    I use Spring MVC and a regular JDBC. I've just learned that I should separate business process into layers which are presentation layer, controller layer, service layer, and repository/DAO layer. Now suppose that I have an Entity called Person that can have multiple Jobs. Job itself is another entity which have its own properties. From what I gathered, the repository layer only manages one entity. Now I have one entity that contains another entity. Where do I "join" them? The service layer? Suppose I want to get a person whose job isn't known yet (lazy loading). But the system might ask what the job of that particular person is later on. What is the role of each layer in this case? Please let me know if I need to add any detail into this question.

    Read the article

  • How have your coding values changed since graduating?

    - by Matt
    We all walked out of school with the stars in our eyes and little experience in "real-world" programming. How have your opinions on programming as a craft changed since you've gained more experience away from academia? I've become more and more about design a la McConnell : wide use of encapsulation, quality code that gives you warm fuzzy feelings when you read it, maintainability over execution performance, etc..., whereas many of my co-workers have followed a different path of fewer middlemen layers getting in the way, code that is right out in the open and easier to locate, even if harder to read, and performance-centric designs. What have you learned about the craft of software design which has changed the way you approach coding since leaving the academic world?

    Read the article

  • Does anybody have practice in programming PCMEF - architectures?

    - by Erkki
    PCMEF is an architecture style presented in the book Practical Software Engineering by Maciaszek and Liong. The layers are: P: Presentation C: Controller M: Mediator E: Entity F: Foundation. It is some kind of enchancement compared with MVC - architecture. I recommend it to interactice, data and communicating - oriented purposes. I have programmed it using Visual Prolog. Foundation in my applications is the data model (domains) for the application. PCMEF is like a simulated computer: Presentation is the display, Controller the user interface and event handling, Mediator the internal logic and data highway. Entity is the database or external interfaces and F defines the knowledge. This is a really nice small architecture. Does any other have experiance of it?

    Read the article

  • Switching to HTML 5 and CSS3

    - by Kevin Sylvestre
    I constantly find myself creating sites using newer technologies (such as HTML 5 and CSS 3, then adding either backwards compatibility layers or porting entirely to XHTML 1.0 and CSS 2.1. This process often involves replacing CSS with sprite images and adding in flash components for advanced asynchronous support. My question is when can I can start to use the modern standards exclusively. Do I need to wait until Internet Explorer 9 is released or is it acceptable to request users switch to a "better" browser? Furthermore, if dropping compatibility for non HTML 5 browsers is an option, is it reasonable to ask mainstream users to install the Google Frame Frame? Thanks.

    Read the article

  • Eclipse organization: workspaces, working sets, projects, folders, multiple source folders, ....!!!

    - by Ricket
    There is quite a tier of organization in Eclipse. You can have multiple workspaces, each of which can have projects, these projects can be assigned to working sets, and then each project can have source folders... How do you use all this organization? Do you even use it all? Working sets are so hidden that I hardly know what they are; are they commonly used, or are they hidden because they are so uncommonly used? What is even the methodology behind all this? I'd like a good explanation of the recommended way to use all these different organizational layers, because at the moment I basically just have a bunch of random projects in a single workspace (the default %USER%/workspace folder) and it's getting to be quite an alphabetical mess. So in essence: How do you keep your Eclipse workspace(s) organized?

    Read the article

  • How do I catch the exception in windows application in c#?

    - by user291169
    Where should we catch exception • In Layer Boundary (UI-BLL & BLL-DAL) • In that methods where there is no interaction between Layers only some business logic present How do I write exception in Save/Delete where some DML statement executing? • What should I write in DAL end? • What should I write in BLL end? • What should I write in UI end? In Get/Load method How do we handle exception • What should I write in BLL end? • What should I write in UI end? Should I catch System exception?

    Read the article

  • VS2008 project with Entity Framework model results in "always dirty" compile

    - by Jeremy Lew
    In VS 2008, I have a simple .csproj that contains an Entity Framework .edmx (V1) file. Every time I build the project, the output DLL is updated, even though nothing has changed. I have reproduced this in the simplest-possible project (containing one ordinary .cs file and one edmx model). If I remove the edmx model and build repeatedly, the output assembly will not be touched. If I add the edmx model and build repeatedly, the output assembly is modified each time. This is a problem because the real project is a dependency of dozens of other projects and it is wreaking havoc with what times when working in higher layers of the application. Is this a known problem? Any way to fix it? Thanks!

    Read the article

  • Is N-Tier Architecture only the physical seperation of code or there is something more to it?

    - by Starx
    Is N-Tier Architecture only the physical separation of code or there is something more to it? What sorts of coding do we put in Presentation Layer, Application Layer, Business Logic Layer, User Interface Logic, Data Access Layer, Data Access Object,? Can all the layers mentioned above give a fully functional N-tier architecture? For example: Whenever a user clicks a button to load a content via AJAX, they we do coding to fetch a particular HTML output and then update the element, so does this JavaScript coding also lie on a different tier? Because If N-tier Architecture is really about physical separation of code, than i think Its better to separate the JavaScript coding also.

    Read the article

  • Implementation communication protocols in C/C++

    - by MeThinks
    I am in the process of starting to implement some proprietary communication protocol stack in software but not sure where to start. It is the kind of work I have not done before and I am looking for help in terms of resources for best/recommended approaches. I will be using c/c++ and I am free to use use libraries (BSD/BOOST/Apache) but no GPL. I have used C++ extensively so using the features of C++ is not a problem. The protocol stack has three layers and it is already fully specified and formally verified. So all I need to do is implemented and test it fully in the specified languages. Should also mention that protocol is very simple but can run on different devices over a reliable physical transport layer Any help with references/recommendations will be appreciated. I am willing to use a different language if only to help me understand how to implement them but I will have to eventually resort to the language of choice.

    Read the article

  • History tables pros, cons and gotchas - using triggers, sproc or at application level.

    - by Nathan W
    I am currently playing around with the idea of having history tables for some of my tables in my database. Basically I have the main table and a copy of that table with a modified date and an action column to store what action was preformed eg Update,Delete and Insert. So far I can think of three different places that you can do the history table work. Triggers on the main table for update, insert and delete. (Database) Stored procedures. (Database) Application layer. (Application) My main question is, what are the pros, cons and gotchas of doing the work in each of these layers. One advantage I can think of by using the triggers way is that integrity is always maintained no matter what program is implmentated on top of the database.

    Read the article

  • DDD Infrastructure services

    - by Zygimantas
    Hello, I am learning DDD and I am a little bit lost in Infrastructure layer: As I understand, "all good DDD applications" should have 4 layers: Presentation, Application, Domain and Infrastructure. Database should be accessed using Repositories. Repository interfaces should be in Domain layer and repository implementation - in Infrastructure (reference http://stackoverflow.com/questions/693221/ddd-where-to-keep-domain-interfaces-the-infrastructure). Application, Domain and Infrastructure layer should/may have services (reference www.lostechies.com/blogs/jimmy_bogard/archive/2008/08/21/services-in-domain-driven-design.aspx), in example EmailService in Infrastructure layer which sends Email messages. BUT, inside Infrastructure layer we have repository implementations, which are used to access database. So, in this case, repositories are database services? What is the difference between Infrastructure service and repository? Thanks in advance!

    Read the article

  • script only works in IE

    - by Alex
    I have the following JavaScript for show running line: <script type="text/javascript" language="javascript"> //Change script's width (in pixels) var marqueewidth=800 //Change script's height (in pixels, pertains only to NS) var marqueeheight=20 //Change script's scroll speed (larger is faster) var speed=3 //Change script's contents var marqueecontents='You text here' if (document.all) document.write('<marquee scrollAmount='+speed+' style="width:'+marqueewidth+'">'+marqueecontents+'</marquee>') function regenerate(){ window.location.reload() } function regenerate2(){ if (document.layers){ setTimeout("window.onresize=regenerate",450) intializemarquee() } } function intializemarquee(){ document.cmarquee01.document.cmarquee02.document.write('<nobr>'+marqueecontents+'</nobr>') document.cmarquee01.document.cmarquee02.document.close() thelength=document.cmarquee01.document.cmarquee02.document.width scrollit() } function scrollit(){ if (document.cmarquee01.document.cmarquee02.left>=thelength*(-1)){ document.cmarquee01.document.cmarquee02.left-=speed setTimeout("scrollit()",100) } else{ document.cmarquee01.document.cmarquee02.left=marqueewidth scrollit() } } window.onload=regenerate2 </script> What should I change in script to make it work in FF and Chrome? Thanks

    Read the article

  • Are there any pitfalls to having two different Models from two different assemblies? (EF)

    - by Jonn
    I have two projects, both of them data access layers, and both using EF. I have another project calling services related to the two different assemblies. Are there any pitfalls on using two different models on two different databases linked to the same database? I'm asking this because I've been getting this generic "EntitySqlException" could not be resolved in the current scope or context. Make sure that all referenced variables are in scope, that required schemas are loaded, and that namespaces are referenced correctly., near escaped identifier. that does not appear when are run separately but appear when under the same project.

    Read the article

  • How do you keep Cocoa controllers from getting too big?

    - by zoul
    Hello! Do you have some tricks or techniques to break Cocoa controller classes into smaller chunks? I find that whatever I do the controllers end up being one of the more complicated classes in my design. The basic stuff is simple, but once I have several pop-overs or action sheets running, things get uncomfortably complex. It's not that bad, but still I would like to refactor the code into several standalone chunks. I thought about categories, but the code is not that independent (a lot of times it needs to tap into viewWillAppear, for example) and I find that I spend a long time fighting the compiler. I also thought about adding functionality in layers using inheritance, but that feels like a hack.

    Read the article

  • Put Raphael (SVG) canvas behind other divisions to make them clickable?

    - by Kerry
    I am using Raphael to create lines between divisions in an organization chart (or flow chart), but I need to be able to actually click on the divisions and content behind it. If I could make the canvas be behind the other elements, kind of like a background image, that would be idea. Is this possible? UPDATE: I found a solution. Raphael makes an SVG canvas that is absolutely positioned in my case. Absolute positions act as layers, and so to be on top of that layer, my content had to be absolutely positioned as well. If someone else has a better solution, I would be happy to hear it, though this is working fine.

    Read the article

  • Jagged Array in C (3D)

    - by Daniel
    How could I do the following? double layer1[][3] = { {0.1,0.1,0.8}, {0.1,0.1,0.8}, {0.1,0.1,0.8}, {0.1,0.1,0.8} }; double layer2[][5] = { {0.1,0.1,0.1,0.1,0.8} }; double *upper[] = {layer1, layer2}; I read the following after trying different ideas; to no avail. jagged array in c I understand (I hope) that double **upper[] = {layer1, layer2}; Is similar to what I'd like, but would not work because the layers are not arrays of pointers. I am using C intentionally. I am trying to abstain from doing this (which works). double l10[] = {0.1,0.1,0.8}; //l11 etc double *l1[] = {l10,l11,l12,l13}; double l20[] = {0.1,0.1,0.1,0.1,0.8}; double *l2[] = {l20}; double **both[] = {l1, l2};

    Read the article

  • do people value information or aesthetic value of websites ? [closed]

    - by fwfwfw
    I'm thinking, why does the web have to be so colorful. meaning, all the information is buried deep beneath layers of flash, javascripts, html and images. Sure, a good positioning of these media files, create an aesthetic value but how important is it to the user ? moreover, aren't people looking for information after all ? why can't the internet be a uniform looking data warehouse ? now we've gotta digg through all the aesthetic junk, using shady web scraping techniques, unless RSS or API is provided. why can't we settle for just a dull grey button and framesets for navigation ? why can't all sites have navigation frame on the left and top ? why can't all sites put their damn data always in normalized table tag ?

    Read the article

  • Is there an easier way to reconcile a list of files and a directory with subfolders/files to find ch

    - by rwmnau
    I have a SQL Server table with a list of files (path + filename), and a folder with multiple layers and files in each layer. I'm looking for a way to reconcile the two without having to process the list twice. Currently, I'm doing this: For Each f as FileInfo In FileListFromDatabase If f.Exists is False, mark it as deleted in the database Next For Each f as FileInfo In RecursiveListOFFilesOnDisk If Not FileExistsInDatabase, then add it Next Is there a better way to do this? I'd like to avoid converting all the matching files (of which most will be) to FileInfo objects twice. Since I'm a T-SQL developer first, I'm picturing something like an OUTER JOIN of the two lists where they don't match. Something LINQ-ish?

    Read the article

  • Possible to access all Movie clips on a layer, on timeline, through stage ?

    - by azislo
    I have a code ... var selection:Array = new Array(); var diplayObjCont:* = stage; // The rectangle that defines the selection in the containers coordinate space. // Loop throught the containers children. for(var a:int; a<diplayObjCont.numChildren; a++){ // Get the childs bounds in the containers coordinate space. var child:DisplayObject = diplayObjCont.getChildAt(a); selection.push(child); } trace(selection); that returns just [object MainTimeline] So, can I access layers on this MainTimeline to get all Movie Clips on this layer ? So I can do a simple operation "A_1_2.buttonMode = true;" to all my MC's (in an array for example) without writing every line (lot of MC's on layer and lot of lines).

    Read the article

  • [as3] Movieclip.width returns higher value than Movieclip stage on Width.

    - by Sawrb
    I have a Movieclip on stage with nested movieclips inside. All referenced at 0,0. None of the child movieclips load any dynamic content, animate or have Masked Layers. It does have an input textfield in one of the child MCs. The parent MC shows 280 px width, while it returns 313 px with a .width trace. There is no code that alters the .width value of the parent MC at run-time. And the ParentMC on stage is not scaled (it is at 100% width/height). Any pointers, to what could be the reasons for the discrepancy in .width values on stage and on run-time? Its breaking the scaling code that follows.

    Read the article

  • Unit testing with Data Access Layer

    - by chobo
    Hi, what is a good way to write unit tests with a LINQ to SQL DAL? Currently I am doing some database testing and need to create helper methods that access the database, but I don't want those methods in my main repo's. So what I have is two copies of the DAL, one in my main project and one in the Test project. Is it easier to manage these things if I create a separate project for the data layer? I'm not sure which way is a better way to approach this. If I do create a data layer project would I move all my repo's to that project as well? I'm not sure how to properly setup the layers. Thanks

    Read the article

  • Should i use partial classes as business layer when using entity framework?

    - by samsur
    I am working on a project using entity framework. Is it okay to use partial classes of the EF generated classes as the business layer. I am begining to think that this is how EF is intended to be used. I have attempted to use a DTO pattern and soon realized that i am just creating a bunch of mapping classes that is duplicating my effort and also a cause for more maintenance work and an additional layer. I want to use self-tracking-entities and pass the EF entities to all the layers. Please share your thoughts and ideas. Thanks

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >