w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Do any standards and practices exist for applying acceptance test driven development to non-development tasks?
Take a look at this post in StackExchange: Agile methodologies such as Scrum in non-software development projects Also there is a nice article called "Scrum is not just for software" written by the Agile Alliance (note that this is a PDF download)

Categories : Misc

What are the best practices for building a SPA application?
Check SPA Q&A Link http://www.johnpapa.net/spa-questions/ Sample project available on github click here Further Angular.js is complete framework you can check that too.

Categories : Misc

WPF Application Update Best Practices - Architectural Explanation
What you are describing here is a good fit for looking into using MEF. Manage Extensibility Framework will allow you to make use of non-statically referenced library files that adhere to a standard interface that you define. Since they are not statically referenced you can replace these library files within an installed application without the need for recompiling the rest of the application. In these terms any "replaceable" logic should be placed within these MEF'd libraries and treated like plugins. That way you can updating them whenever required. As for handling the detection and download of new version of plugins that will be something you have to roll on your own.

Categories : C#

Best Practices: Creating a simple CRUD web application with users/roles
consider having a completely separate table just for wines that is not associated with users. this table has wine parents and children. the parent contains fields for the winery, the name of the wine, location, etc. the children would be the specific years of the vintage. so a user enters a wine name in his tracker. the system looks it up - if its not found then the user creates the record. system creates a parent record and a separate child record with the year. if the wine is found - then the user can update the parent record, and either chose a year, or enter a new one. system would then add a record to a separate table - users_wines - with the id of the parent (the wine) and the id of the child (the specific year) this opens up many different possibilities including having wi

Categories : PHP

node.js & express - global modules & best practices for application structure
I found this StackOverflow post very helpful: File Structure of Mongoose & NodeJS Project The trick is to put your schema into models directory. Then, in any route, you can require('../models').whatever. Also, I generally start the mongoose db connection in app.js, and only start the Express server once the connection is up: mongoose.connect('mongodb://localhost/whateverdb') mongoose.connection.on('error', function(err) { console.log("Error while connecting to MongoDB: " + err); process.exit(); }); mongoose.connection.on('connected', function(err) { console.log('mongoose is now connected'); // start app here http.createServer(app).listen(app.get('port'), function(){ console.log('Express server listening on port ' + app.get('port')); }); });

Categories : Javascript

Guidelines for the development of web Gis Application
Please see some ideas below set out to answer your questions. I think the way to integrate the most amount of data sources is probably with the the OpenGeo Suit. This is an open source software stack that includes Geoserver as a WMS source and GXP libraries and examples as the front end client. It can be found here http://opengeo.org/ There are a number of Open source projects out there that will help. I have already mentioned OpenGeo. Also check out Openlayers http://openlayers.org/ GeoExt (Can't post link as I don't have enough reputation points yet) Leaflet (Can't post link as I don't have enough reputation points yet) Geoserver is a good one for this but you could also checkout Mapserver (Can't post link as I don't have enough reputation points yet) In summary I would recommend th

Categories : Asp Net

Contacts android application development
try to use checking string like this if ((!name.equals("")) && name !=null ) { ops.add(ContentProviderOperation.newInsert( ContactsContract.Data.CONTENT_URI) .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0) .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE) .withValue( ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME, name).build()); } else { Toast.makeText(this, "Enter Valid Name",Toast.LENGTH_LONG).show(); return; } if (!(number

Categories : Java

Confusion about API-based application development
With SOA, I wouldn't really say this is necessarily Go or Ruby/Rails specific. It would be the same if you were just using Ruby or Go by themselves. What it comes down to is how your application is architected. You could do SOA with just Ruby or Go. There are a lot of benefits to a Service Oriented Architecture. Clear separation of responsibility Different teams can work on different components Simplifed application archetecture code-wise Can lower development and management costs Configuration flexibility Targeted performance monitoring Simplified/gradual software updates Inherent service documentation (godoc generates from source) Targeted unit testing (does the service work?) Better scalability You could probably add more benefits to that list. The biggest obstacle to overcome is

Categories : Ruby On Rails

Mobile application development using HTML5
HTML is basically for webpages and hence HTML5. Yes you can create a mobile app with HTML5 only, but it will be a like a website and when you want to display it, you will still need to use webview or a browser, so still you will need some other tools. But there are some frameworks which are using HTML 5, try PhoneGap. Hope this will help. Thanks

Categories : HTML

Application resource path is different from development and IIS7
For an alias, try setting the path of the app in IIS7. Try this: http://www.codeproject.com/Questions/460354/How-to-set-virtual-path-of-my-application-hosted-o You should be able to use ~/folder/resource.ext syntax in newer versions of mvc. The ~ uses a relative path based on the location of the app. Or, use Url.Content("~/folder/resource.ext") if that doesn't work, which should work in all versions.

Categories : Asp Net Mvc

SOLVED!! Best Practise for GUI development for vanilla C++ application
You can to a large extent write completely separate logic and GUI code in Qt. However you will be able to create a much more useful GUI if you allow the logic and GUI code to interact. Qt has it's own classes for a lot of things (QString, QVector<> etc.) but you're free to ignore these for the most part and use the standard library instead if you'd prefer. However, I do not think that it is worth trying to separate Qt from the logic code entirely because, as mentioned before, you will be able to build a much better GUI if they interact. For a simple example you could write a very simple Qt GUI with just a window and a button; press that button and some logic code is run. However with more interaction you could use signals and slots to update a progress bar on the GUI to let the user kn

Categories : C++

Xbox Application Development using C# and Visual Studio
Visual Studios seems to be what most developers would use for xbox. As for languages if your looking to develop apps for xbox and not games, you could use C# or WPF. Hope this was a bit helpful.

Categories : C#

When exactly session is created in java web application development?
A user session is/(should be) created after the successful login of the user into the system and it will be valid till the user logs out of the system or the session expires after the session timeout.

Categories : Java

Sharing Private keys in application development
You don't want to share your private keys with your developers...you should restrict access to the private key to a very small group of trusted people. To allow developers to work on code you can use Delay Signing/Test Key signing: http://blogs.msdn.com/b/shawnfa/archive/2004/03/17/91575.aspx On your secured CI/Build Server that generates your "releases"...you would allow it access to the production private key and then use that in the build process during a "Release" build (which doesn't use Delay Signing) to sign everything properly. What exactly are Delay signing and strong names in .net? http://blogs.msdn.com/b/shawnfa/archive/2005/10/24/484170.aspx http://blogs.msdn.com/b/shawnfa/archive/2006/06/23/644648.aspx

Categories : Java

Access to Application Support Directory on the device during development
Take a look at http://developer.apple.com/library/mac/#recipes/xcode_help-devices_organizer/articles/copy_app_data_from_sandbox.html This should provide you with a package of all data within the App's sandbox

Categories : IOS

ImageButton control with Google TV android application development
Make sure your ImageButtons are marked as focusable. You'll also want to make sure you set the nextFocus* related attributes as well. The following is from my project, Serenity for Android which uses ImageButtons on the OSD when playing a video. <ImageButton android:id="@+id/osd_rewind_control" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@android:color/transparent" android:focusable="true" android:nextFocusRight="@+id/mediacontroller_play_pause" android:nextFocusUp="@+id/mediacontroller_seekbar" android:scaleType="fitXY" style="@android:style/MediaButton.Rew" android:src="@drawable/skipback_selector" tools:ignore="ContentDescription" /> Agai

Categories : Android

How do I statically configure Celery application differently in production and development?
The way that I do it is using an environment variable. As a simple example... # By convention, my configuration files are in a "configs/XXX.ini" file, with # XXX being the configuration name (e.g., "staging.ini") config_filename = os.path.join('configs', os.environ['CELERY_CONFIG'] + '.ini') configuration = read_config_file(config_filename) # Now you can create the Celery object using your configuration... celery = Celery('mymodule', broker=configuration['CELERY_BROKER_URL']) @celery.task def add_stuff(x, y): .... You end up running from the command line like so... export CELERY_CONFIG=staging celery -A mymodule worker This question has an example of doing something like this, but they say "how can I do this in a way that is not so ugly?" As far as I'm concerned, this is quite

Categories : Python

Why assets (except application.css, applications.js) are not being served in Development mode using require_tree
Actually, it was the problem with the order in which the JavaScript files are being loaded using require_tree. directive. When we use require_tree. it assumes to load all the js files inside the app/assets/javascripts directory in alphabetical order. But in case of javaScript, we can load the files in a particular order so that one file should not conflict with the other regarding any functionalilty. So, it is better to avoid require_tree. directive unless we are using only small number of js files. You can explicitly declare each file in the application.js manifest file so the order can be controlled. The common files you are loading can be put in to a separate directory under app/assets/ and it can be loaded using require_directory ./separate_directory_name to load it (iff it has not

Categories : Ruby On Rails

Returning errors back to development team from deployed iOS application
Depends on what kind of errors you're talking about... Exceptions are automatically reported back by Apple. But, they don't give all exceptions back and there is a lag. There are several 3rd party services which you can use where you add their framework and it will detect the exception and send it back to their server for you to analyse. For non-exception errors there is nothing standard. I would suggest adding analytics to your app and using part of the analytics to track these occurrences.

Categories : IOS

Library/Framework for Single Page Application Development (as of 2013)
I finally made my own jQuery plugin. It manages the page-swapping and the ajax loading from files, firing custom events before and after each page is shown. Took no more than 150 lines comments included. I kept the parameter-passing stuff out, though.

Categories : Javascript

How to design/organize/architect the development of mobile web within a Rails application?
It seems to me that the one piece of essential information is "why?" and you need to consider your budget and timescales and deadlines for the job. Providing you use a liquid layout similar to the awesome layouts by Matthew James Taylor that will resize according to the available screen size The only reason I can see for needing mobile specific templates is in order to provide specific css styling to make you views look more like a mobile app. I don't see performance as being an issue. If you have performance overhead from an existing website and you are designing these performance issues out for mobile then why not also design these issues out for the non mobile. i.e. design a mobile site with a liquid layout and make it work for desktop/tablet viewing as well. It could be an good oppor

Categories : Ruby On Rails

What is the exact way for view handling in multiple orientation in iPad application development?
And here is a guide from apple. If autolayout it's not suitable for you, then you need a separate landscape viewcontroller. https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/RespondingtoDeviceOrientationChanges/RespondingtoDeviceOrientationChanges.html

Categories : IOS

Does SCOM make sense as an application monitoring tool (used by development group)?
Yeah, what you're asking is somewhat possible. I spent the best part of a day trying to figure this out and so I thought I'd post what I found for you here. it is possible to set up monitoring for any log on any machine. As long as you can see that log in windows with the event log viewer (there are actually many more, but if you can see it here. Assume it can me monitored. Put whatever you are monitoring into it's own group in SCOM and set up it's own management pack. You can even set up mail alerts with the criteria for a subscription matching 'raised by any instance in a specific group' if you want to be mailed about these alerts. Here is an example if you wanted to monitor just the 'application' log on a remote server: Start the Operations Console as a member of the Operations Ma

Categories : Windows

android application development- saving and retrieving the values of editText and textView
Its happening because you are saving all data in Arrays which get cleaned up when the app exits. There are several ways tht you could do this. You could either use SharedPreferences to save your data or write your values to a file. For e.g. you could use SharedPreferences as follows: public static final String MY_PREF = "MyPreference"; SharedPreferences.Editor editorPref; public static String keyName = "MyKey"; SharedPreferences myPref; You could then create the shared preference and add values to it.Hope this helps

Categories : Java

WebMethod error response as application/json on Development but text/html on Production
It turns out the issue is about "Friendly Error Message" - which is in html format. IIS is using this by default on Windows 2008 R2 machine. As a solution, I found this article: http://helpnotes.vpasp.com/kb/611-General-hosting-questions/1089-How-to-Turn-Off-Friendly-Error-in-IIS-7xx/ and performed #4 to #6.

Categories : Jquery

.NET integration with Honeywell D6X00 Platform SDK ( for Personal digital assistant - Dolphin 6500 Mobile Computer application development )
Although this is now several weeks old... If you get a windows mobile device from any company and need an SDK for special hardware in the dvice, you first have to look for downloads at the company's web site. For a Dolphin 6500, for example, you will find the possible downloads at https://www.honeywellaidc.com/en-US/resources/Pages/download.aspx?pid=DOLPHIN6500. To develop for a Windows Mobile (NOT Windows Phone!) you need a full VS2005 or 2008 version, the Express one's will not support SmartDevice development. After you have downloaded and installed at least one Windows Mobile SDK by the MS sites. You are able to start a SmartDevice project in your VS setup. You can write C/C++, C# or VB.net SmartDevice projects (you can also mix the progr. languages). The company's SDK is only an exte

Categories : Dotnet

windows mobile application development Windows 7 Operating System
I dont understand the question. I had to do nothing special as I installed Visual Studio 2008 and then the Windows Mobile 6 SDK. I assume, you already connected the WM device to your Win7 station. So you should have WMDC already installed. Otherwise install Windows Mobile Device Center from the MS site. Secondly install VS2008 (not express version, it does not support WM development). Then download and install Windows Mobile 6 (professionell) SDK and install. That is all, nothing special. I did it without any hassle on my Win7/64 PC. Should be the same for Win7/32. If you need further assistance be more specific in your description.

Categories : Windows

How to Test ASP Application on Domain when Development Environment isn't on Domain?
We did few large deployments of AD with asp.net applications with automatic account provisioning and 50k+ users and the idea was always to abstract the user backstore and have at least two or three implementations: inmemory repository injected into upper layer services for unit testing them database implementation convenient for developers as it is persistent, doesn't vanish on restarts actual ad implementation tested separately in two different testing environments but not directly by developers (devs use the database repository) Having the logic which relies on abstraction and is conveniently tested with the inmemory repository and then having the ad repository tested separately allows us to just compose these two on the production site.

Categories : Asp Net

New iOS SDK Best Practices
Unfortunately, there is none. Installing a new version of Xcode might mess up with your settings. Also, a project created in Xcode N+1 (or updated with it) might not be openable in Xcode N. For iOS N+1, it's even worse: Apple says that you can't roll back to iOS N after installing the beta. It used to work for my colleagues with iOS 6 -> iOS 5 though. The only thing I can think of: Install Xcode N+1 on another mac Install iOS N+1 on another phone.

Categories : Iphone

Best practices for Eclipse 4 DI
You can create a service class in your project, let's say ModelService. Add @creatable and @singleton annotations to that class : @creatable @singleton class ModelService{ } And let DI do its job using following syntax in your parts/handlers/etc .. @Inject ModelService modelService; Then you can implement methods in your service like 'createBaseModel()', updateModel() and so on. This creates a low coupling solution : you can also implement ModelService in a separate plugin and define it as a OSGi service. for that solution, you can read this Lars Vogel article.

Categories : Eclipse

Animations best practices
At the moment the best practice is probably to use the ember-animated-outlet plugin. https://github.com/billysbilling/ember-animated-outlet. An API for animated transitions will probably be a part of Ember 1.1, but in the interim the Ember core team has expressed support for the ember-animated-outlet" project.

Categories : Ember Js

Rails Best Practices - Can I use a lot of "has many"?
In many places you're using has_many as if it were a scope. Read up on scopes here. Scopes allow you to define a query that can then be accessed like a method. For example: class Loan < ActiveRecord::Base scope :current, where(current: true, agreed: true) end Can be called like so: Product.first.loans.current Make sure you put these scopes in the appropriate models too, you don't want to filter your loans in the product model for instance.

Categories : Ruby On Rails

xml serialisation best practices
First of all, I would suggest to use "using" blocks in your code.(Sample code) If my understanding is OK, you are looking for a fast way to build your model classes that you will use during your deserialize/serialize operations. Every Xml file is different and I don't know any generic way to serialize / deserialize them. At one moment you have to know if there will be an attribute, or elements or if any element can be null etc. Assuming that you already have a sample XML file with a few lines which gives you general view of how it will look like I would suggest to use xsd (miracle tool) xsd yourXMLFileName.xml xsd yourXMLFileName.xsd classes This tool will generate you every time model classes for the XML file you want to work it. Than you serialize and deserialize easily To des

Categories : C#

Constructor best practices
Constructors are meant to initialize the data fields in the object. Given the choices, the second approach seems more correct. Although what might be better is to include the doDFS method in your graph object. It's usually bad practice to create an entire class for a single simple function. The doDFS method is specific to the graphs it works with, so including it in whatever graph class you have is natural.

Categories : Java

What are the best practices on catching COM-exception in C#?
You must look for the HRESULT, this is the errorcode of the Exception Instance, and therefore the only way to really know what is going on. You can decypher the HRESULT with this and this article. Example: try { //Your code } catch(COMException ex) { int error = ex.ErrorCode; //Conditions and error handling } Basically the HRESULT is a 32 bit integer where the two most significant bits describe what sort of message it is (succes, info, warning, error). The other 30 bits are used to describe the rest of the message.

Categories : C#

WPF MVVM Code Behind Best Practices
MVVM does not mean that you cannot use Code-Behind. MVVM means that your application logic should not be tied to UI elements. You can perfectly well handle events in code behind (such as Window.Closing), and "send messages" or execute methods in the ViewModel to react to that. Here, you are not breaking MVVM by placing the event handler in code behind. You would be breaking MVVM if you were placing the logic that determines whether the application can be closed in code behind. That is a responsibility of the application logic, and the application logic lives in ViewModels, not Views.

Categories : C#

Javascript best practices with web sockets
There is no preferred way to structure your Javascript in Play. This imposes some more work upon you, but also leaves you more flexible. If you need an opinionated approach to Javascript, there's a lot for you out there: from backbone.js to AngularJS. Some are easier to use, some are smaller, some provide a stronger structure. Just have a look through them. You should also at least have a look at Ractive.js. Haven't used it so far, but it sounds awesome. But, well, to come back to your question: you don't need some JS framework. Just do what you think fits your project. These frameworks might help you, but at the end of the day, it's up to you.

Categories : Javascript

Best practices for overall rating calculation
Given only the information provided, the only options I see: The obvious one - reduce the time taken for a rating calculation (6 seconds to calculate 1 user's rating seems like a lot) If possible, have intermediate values which you only recalculate some of, as required (for example, have 10 values that make up the rating, all based on different data, when some of the data changes, flag the appropriate values for recalcuation). Either do this recalculation: During your daily recalculation or When the update happens Partial batch calculation - only recalculate x of the users' ratings at chosen intervals (where x is some chosen value) - has the disadvantage that, at all times, some of the ratings can be out of date Calculate if not busy - either continuously recalculate ratings or only

Categories : Algorithm

Auto-login best practices
Sending an auto-login link is fairly similar in risk to sending password-reset links in email and lots of sites do that. This is a judgement call that you have to make. There's not a shared decision matrix that people use to decide what is and isn't an acceptable risk. What you're making here is more of a business decision, you're weighing the security risks versus ease of use (which can translate to more users and more business). You need to ask the question 'What's the absolute worst thing in terms of site availability, business reputation and user experience that can happen if this feature is mis-used?'. Additional things you should be concerned about: People plucking your auto-login links of off of shared wifi networks Auto-login links ending up in the logs of proxies between yo

Categories : Security

OpenGL ES best practices for conditionals
Historically speaking GPUs have supported per-fragment instructions such as MIN and MAX for much longer than they have supported arbitrary conditional branching. One example of this in desktop OpenGL is the GL_ARB_fragment_program extension (now superseded by GLSL) which explicitly states that it doesn't support branching, but it does provide instructions for MIN and MAX as well as some other conditional instructions. I'd be pretty confident that all GPUs will still have dedicated hardware for these operations given how common min(), max() and clamp() are in shaders. This isn't guaranteed by the specification because an implementation can optimize code however it sees fit, but in the real world you should use GLSL's built-in functions rather than rolling your own. The only exception woul

Categories : IOS



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.