Search Results

Search found 504 results on 21 pages for 'abstraction'.

Page 12/21 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • NHibernate with or without Repository

    - by Groo
    There are several similar questions on this matter, by I still haven't found enough reasons to decide which way to go. The real question is, is it reasonable to abstract the NHibernate using a Repository pattern, or not? It seems that the only reason behind abstracting it is to leave yourself an option to replace NHibernate with a different ORM if needed. But creating repositories and abstracting queries seems like adding yet another layer, and doing much of the plumbing by hand. One option is to use expose IQueryable<T> to the business layer and use LINQ, but from my experience LINQ support is still not fully implemented in NHibernate (queries simply don't always work as expected, and I hate spending time on debugging a framework). Although referencing NHibernate in my business layer hurts my eyes, it is supposed to be an abstraction of data access by itself, right? What are you opinions on this?

    Read the article

  • Javascript how many characters replaced in a regex?

    - by macca1
    I am sanitizing an input field and manually getting and setting the caret position in the process. With some abstraction, here's the basic idea: <input type="text" onkeyup"check(this)"> And javascript... function check(element) { var charPosition = getCaretPosition(element); $(element).val( sanitize( $(element).val() ) ); setCaretPosition(element, charPosition); } function sanitize(s) { return s.replace(/[^a-zA-Z0-9\s]/g, ''); } This is working fine except when a character does actually get sanitized, my caret position is off by one. Basically I'd like a way to see if the sanitize function has actually replaced a character (and at what index) so then I can adjust the charPosition if necessary. Any ideas?

    Read the article

  • XSD data set with Oracle database

    - by Ed Woodcock
    Hi folks, I'm having a major issue with an XSD dataset mapping thingy that I'm using within my current project. We are using XSDs for some data abstraction (it's quicker and debatably more maintainable that using Parameterised SQL or a StoredProc), and on my machine (running in the VS development environment) thy're working fine. However, on the Pre-production server we use for our testing, the XSDs are not working correctly: some method calls will fail with the following error: System.ArgumentException: Value does not fall within the expected range. at Oracle.DataAccess.Client.OracleParameter.set_DbType(DbType value) Has anyone ever encountered this issue before? The methods being called are simple select statements using 1-3 parameters, and as I said before they work fine on my machine.

    Read the article

  • What should I really release as open source when I use Berkeley DB (JE)?

    - by Ersin Er
    The Berkeley DB (JE) license information says: "...Redistributions in any form must be accompanied by information on how to obtain complete source code for the DB software and any accompanying software that uses the DB software.... For an executable file, complete source code means the source code for all modules it contains. It does not include source code for modules or files that typically accompany the major components of the operating system on which the executable file runs." If I build an abstraction level on top of BDB JE, should I open source only that library or any software that uses BDB JE indirectly?

    Read the article

  • MDB2 With SQL Express 2008

    - by Narcissus
    Hi all, So basically here's my problem. I'm looking for a solution to allow us to connect with SQL Express 2008, while still using MDB2 as our database abstraction layer. I need something like this, mainly because we still need to be able to use MySQL and Postgres (and ORMs seem to be not an option at this point in time). Preferably, there would be a solution that works for both PHP5.2 and PHP5.3. At first I went down the php_mysql extension road... it seems, though, as though that is not available in PHP 5.3. php_pdo_mssql doesn't seem to be usable with MDB2, so that seems to be out. Finally, there's the MS developed 'SQLSRV' extension, and while it seems as though there was work on a MDB2 'extension' for it at one point, it doesn't seem to have ever made it into the main branch. Please... does anyone have any solutions for me?

    Read the article

  • creating a wrapper around a 3rd party assembly - swap out and decouple

    - by mrblah
    I have an email component that I am integrating into my application, looking for some tips on how should build a wrapper around it so I can swap it out with another 3rd party component if needed. My approach right now is it: build an interface will the functionality I need. create a class that implements the interface, using my 3rd party component inside this class. any usage of this component will be via the interface so like: IPop3 pop3 = new AcmeIncePop3Wrapper(); pop3.connect(); and inside AcmeIncePop3Wrapper will be: public void connect() { AcmeIncePop3 pop = new AcmeIncePop3(); pop.connect(); } Is that a good approach? I could probably add another abstraction by using ninject so I could swap out implementations, but really this seems to be all I need as i don't expect to be changing 3rd party assemblies every day, just don't want to make things so tightly coupled.

    Read the article

  • Managing Static Library project as a module like Framework on iOS project in Xcode4.

    - by Eonil
    (Solution Note, I'll answer immediately) Many people including me trying to make a kind of Static Library framework for iOS to archive some kind of modularity. Framework is best way to do this, but it doesn't provided by Apple, and workarounds don't work well. https://github.com/kstenerud/iOS-Universal-Framework/tree/master/Fake%20Framework/Templates Fake framework cannot be referenced from linking tab in Build Phases. Real framework needs modification of system setting. And still not work smoothly on every parts. Problem is static library need header files, and it's impossible to reference header files on project at another location on different project without some script. And script breaks IDE's file management abstraction. How can I use static library project like a convenient module manner? (just dragging project into another project to complete embedding)

    Read the article

  • Refactor/rewrite code or continue?

    - by Dan
    I just completed a complex piece of code. It works to spec, it meets performance requirements etc etc but I feel a bit anxious about it and am considering rewriting and/or refactoring it. Should I do this (spending time that could otherwise be spent on features that users will actually notice)? The reasons I feel anxious about the code are: The class hierarchy is complex and not obvious Some classes don't have a well defined purpose (they do a number of unrelated things) Some classes use others internals (they're declared as friend classes) to bypass the layers of abstraction for performance, but I feel they break encapsulation by doing this Some classes leak implementation details (eg, I changed a map to a hash map earlier and found myself having to modify code in other source files to make the change work) My memory management/pooling system is kinda clunky and less-than transparent They look like excellent reasons to refactor and clean code, aiding future maintenance and extension, but could be quite time consuming. Also, I'll never be perfectly happy with any code I write anyway... So, what does stackoverflow think? Clean code or work on features?

    Read the article

  • Drupal - Counting data in nodes, creating custom statistics

    - by hfidgen
    Hiya, I'm building some custom content types to capture customer data on a website. Admins will enter the data, users will be able to view it, but I also need to be able to bolt on some statistics and infographics to the data. The problem I have is that I can't see any simple way of doing this within Drupal. Are there modules which can produce simple stats on selected node types or will I have to write a complete custom module using the data abstraction layer? Thanks for any insights!

    Read the article

  • Command Pattern : How to pass parameters to a command ?

    - by Romain Verdier
    My question is related to the command pattern, where we have the following abstraction (C# code) : public interface ICommand { Execute(); } Let's take a simple concrete command, which aims to delete an entity from our application. A Person instance, for example. I'll have a DeletePersonCommand, which implements ICommand. This command needs the Person to delete as a parameter, in order to delete it when Execute method is called. What is the best way to manage parametrized commands ? How to pass parameters to commands, before executing them ?

    Read the article

  • Redirect application's graphical output in Windows Vista/7 (with DWM)

    - by puri
    I want to create a desktop manager that takes informations of all running applications including states and screenshots to display and manipulate them in my virtual space (probably in 3D). It can be considered as another layer of abstraction on top of Windows itself. Because many native Windows Vista/7 features like Flip 3D and Live Thumbnails are able to show each window's activities in real-time e.g. video keeps playing in taskbar's thumbnail, I think DWM allows an application to redirect its output to somewhere else or some special processes are able to collect other applications' graphical outputs (maybe of child processes only). Has Microsoft released a set of public APIs to do so? If not, is it technically possible? And is it easier if I limit my scope to just .NET applications with WPF?

    Read the article

  • HTML5: dragover(), drop(): how get current x,y coordinates?

    - by Pete Alvin
    How does one determine the (x,y) coordinates while dragging "dragover" and after the drop ("drop") in HTML5 DnD? I found a webpage that describes x,y for dragover (look at e.offsetX and e.layerX to see if set for various browsers but for the life of me they ARE NOT set). What do you use for the drop(e) function to find out WHERE in the current drop target it was actually dropped? I'm writing an online circuit design app and my drop target is large. Do I need to drop down to mouse-level to find out x,y or does HTML5 provided a higher level abstraction?

    Read the article

  • Determining Long Tap (Long Press, Tap Hold) on Android with jQuery

    - by Volomike
    I've been able to successfully play with the touchstart, touchmove, and touchend events on Android using jQuery and an HTML page. Now I'm trying to see what the trick is to determine a long tap event, where one taps and holds for 3 seconds. I can't seem to figure this out yet. I'm wanting to this purely in jQuery without Sencha Touch, JQTouch, jQMobile, etc. I like the concept of jQTouch, although it doesn't provide me a whole lot and some of my code breaks with it. With Sencha Touch, I'm not a fan of moving away from jQuery into Ext.js and some new way of doing Javascript abstraction, especially when jQuery is so capable. So, I want to figure this out with jQuery alone. I've been able to do many jQTouch and Sencha Touch things on my own using jQuery. And jQMobile is still too beta and not directed enough to the Android yet.

    Read the article

  • Creating an object relational schema from a Class diagram

    - by Caylem
    Hi Ladies and Gents. I'd like some help converting the following UML diagram: UML Diagram The diagram shows 4 classes and is related to a Loyalty card scheme for an imaginary supermarket. I'd like to create an object relational data base schema from it for use with Oracle 10g/11g. Not sure where to begin, if somebody could give me a head start that would be great. Looking for actually starting the schema, show abstraction, constraints, types(subtypes, supertypes) methods and functions. Note: I'm not looking for anyone to make any comments regarding the actual classes and whether changes should be made to the Diagram, just the schema. Thanks

    Read the article

  • Resetting Objects vs. Constructing New Objects

    - by byronh
    Is it considered better practice and/or more efficient to create a 'reset' function for a particular object that clears/defaults all the necessary member variables to allow for further operations, or to simply construct a new object from outside? I've seen both methods employed a lot, but I can't decide which one is better. Of course, for classes that represent database connections, you'd have to use a reset method rather than constructing a new one resulting in needless connecting/disconnecting, but I'm talking more in terms of abstraction classes. Can anyone give me some real-world examples of when to use each method? In my particular case I'm thinking mostly in terms of ORM or the Model in MVC. For example, if I would want to retrieve a bunch of database objects for display and modify them in one operation.

    Read the article

  • Where are the really high quality and complex Swing components?

    - by jouhni
    Looking at Swing, I have the feeling that it comes with many useful and reasonable atomic components in its core. And when I look at the Web there are hundrets of quickly plugged together components (among them many date/time pickers, pimped lists and tables), which have in common that I could easily write them on my own, if I needed them. When I build big software and come to the point where I need a domain-specific component which is really big, I mostly come to the point where I have to write it on my own, which, due to the point that they are not just plugged together lists and tables, isn't done qickly. So, the question is, why are there no Swing component galleries which contain more than just customized date/time pickers or lists with added tree support. Where are the components which really raise the level of abstraction, or are in best case domain-specific?

    Read the article

  • assistance with classifying tests

    - by amateur
    I have a .net c# library that I have created that I am currently creating some unit tests for. I am at present writing unit tests for a cache provider class that I have created. Being new to writing unit tests I have 2 questions These being: My cache provider class is the abstraction layer to my distributed cache - AppFabric. So to test aspects of my cache provider class such as adding to appfabric cache, removing from cache etc involves communicating with appfabric. Therefore the tests to test for such, are they still categorised as unit tests or integration tests? The above methods I am testing due to interacting with appfabric, I would like to time such methods. If they take longer than a specified benchmark, the tests have failed. Again I ask the question, can this performance benchmark test be classifed as a unit test? The way I have my tests set up I want to include all unit tests together, integration tests together etc, therefore I ask these questions that I would appreciate input on.

    Read the article

  • Why are the interpreters of all popular scripting languages written in C (if not in C at least not i

    - by wndsr
    I recently asked a question on switching from C++ to C for writing an interpreter for speed and I got a comment from someone asking why on earth I would switch to C for that. So I found out that I actually don't know why - except that C++ object oriented system has a much higher abstraction and therefore is slower. Why are the interpreters of all popular scripting languages written in C and not in C++? If you want to tell me about some other language where the interpreter for it isn't in C, please replace all occurences of popular scripting languages in this question with Ruby, Python, Perl and PHP.

    Read the article

  • Proxy object references in MVC code

    - by krystan honour
    Hi there, I am just figuring out best practice with MVC now I have a project where we have chosen to use it in anger. My question is. If creating a list view which is bound to an IEnumerable is this bad practise? Would it be better to seperate the code generated by the WCF Service reference into a datastructure which essentially holds the same data but abstracts further from the service, meaning that the UI is totally unaware of the service implementation beneath. or do people just bind to the proxy object types and have done with it ? My personal feeling is to create an abstraction but this seems to violate the DRY principle.

    Read the article

  • Manipulating individual rows of a datagrid

    - by pfranchise
    Hey, recently I started working on a webpage that has a datagrid. I understand how to add datasources and that sort of thing, or at least I am starting to get it. But my question is about manipulating individual rows or cells. Is that only possible during the databind event handler, that is the only place I have been able to do it so far. I am sure there is a more abstract way of doing the things I want to do, but there are times where I just want to say Datagrid.add(row). I mean, if the datagrid is made up of a certain object type, can I make a new object of that type and just chuck it on the end? I am still new to this stuff, so perhaps what I want to do would defeat the purpose of this added abstraction, but figured I would ask around. Thanks for any advice, tips, or tricks people feel like sharing. Edit: for clarification I am using c#, entity framework, asp.net, and an SQL database.

    Read the article

  • Can a user be a member of multiple Organization Units (OU) in Active Directory ?

    - by Stormshadow
    Can a user be a member of multiple Organization Units (OU) in Active Directory ? Also, is there a standard format mentioned by Microsoft on how an OU should be created and what its attributes are ? I found this in Wikipedia "However, Organizational Units are just an abstraction for the administrator, and do not function as true containers; the underlying domain operates as if objects were all created in a simple flat-file structure, without any OUs. It is not possible for example to create two user accounts with an identical username in two separate OUs, such as "fred.staff-ou.domain" and "fred.student-ou.domain"."

    Read the article

  • How do you replace many characters in a regex?

    - by macca1
    I am sanitizing an input field and manually getting and setting the caret position in the process. With some abstraction, here's the basic idea: <input type="text" onkeyup"check(this)"> And javascript... function check(element) { var charPosition = getCaretPosition(element); $(element).val( sanitize( $(element).val() ) ); setCaretPosition(element, charPosition); } function sanitize(s) { return s.replace(/[^a-zA-Z0-9\s]/g, ''); } This is working fine except when a character does actually get sanitized, my caret position is off by one. Basically I'd like a way to see if the sanitize function has actually replaced a character (and at what index) so then I can adjust the charPosition if necessary. Any ideas?

    Read the article

  • Java: Convenient way to refactor the application.

    - by Harshal
    Hi, Everyone We have an agile enterprise application built on JSP and Servlet without any design strategy. This application was built in early 2002 considering 1000 users. After 2002, we received lots of requests from the marketing partners. Currently, the application has lots of spaghetti code with lots of Ifs and elses. One class has more than 20,000 lines of code with a huge body of functions without abstraction. Now, we need to support billions of records, what we need to do immediately and gradually? We have to refactor the application? Which framework, we need to use? How the usage of the framework will be helpful to the end users? How to convince the leaders to do the refactoring? How to gain the faster response time as compare to the current system?

    Read the article

  • Is Classic ADO still viable for a mixed managed/unmanaged App?

    - by Andy Dent
    We have a complex architecture with much logic in unmanaged code that needs database access. Currently this is via ODBC drivers and MFC classes and we're considering the issues of migrating our abstraction layer to use ADO or ADO.Net. In the latter case we'd have to be pushing database logic back up into the .Net layer. I'm trying to decide if the pain of invoking the database via .Net callbacks is offset by the improvements in ADO.Net. The Wikipedia comparison was interesting although I'm not sure I believe all the points in the comparison table (eg: does ADO.Net always use XML to pass data?). A 2005 comparison shows ADO.Net performing dramatically faster. Microsoft's guide to ADO.Net for ADO programmers suggests we will gain much from going to ADO.Net especially the way that data is available in native (.Net) types rather than solely through OLEAutomation's Variant.

    Read the article

  • SQL Server Operating System

    - by NDeveloper
    Hi, I found an interesting article about Platform layer for SQL Server. It talks about SQLOS. As I understand it is an abstraction layer between the hardware and SQL Server. So does it mean that we can have SQL Server installed without installing windows? It sounds very strange to me... Please tell me where it is possible to find more info on this. And also whoever have used SQLOS and for what reason? What are the main advantages from developers view?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >