Say there we have the package encoding/json. Can I just create a package mypackage and embed all the functions (at least the public functions) into my package without to copy them by hand and basically do calls back to the actual json package? I'm developing a cross platform (Google app engine / native ) solution and I would find a such solution quite useful.
No.
It sounds like you want some sort of package inheritance, this is not a supported feature.
Related
I need to create a reusable component that would only be used by other developers within a single SalesForce organization. The component is made up of VisualForce pages and Apex code. I believe this would normally be done as a managed package in ISVForce, but my understanding is that ISVForce requires additional reviews and this package is only for internal use - it shouldn't be listed on the App Exchange.
Is there a notion of managed packages for internal reuse? Or is there some other way to create distributable, closed-source packages?
You can simple create a managed package and install it to your org via install link, this way do not require security review because you do not need to publish your package in AppExchange. Just read a manual about creating managed package. I do believe that a creation of managed package without publishing in AppExchange is pretty simple and straightforward and that's what you really need
I have a python 3.4 app which I want to publish to the app store. I also want to obfuscate the code as much as possible. I found the pyminifier library which seems to be perfect for the job. However, I am not able to figure out how to use it for an app that is packaged using py2app. I am not even sure if that is possible. I am also open to other strategies to obfuscate.
You need declare all imports in the obfuscated file before use py2app
import zlib, base64, os, paramiko
exec(zlib.decompress(base64.b64decode('eJyVUl2P..."
I develop some GO libraries using Google Cloud SQL and MySQL server. When I imported `appengine/cloudsql, an error below occured.
cloud.go:20:2: cannot find package "appengine/cloudsql" in any of:
/usr/local/Cellar/go/1.1.2/src/pkg/appengine/cloudsql (from $GOROOT)
/Users/lameduck/myGo/src/appengine/cloudsql (from $GOPATH)
I know this package, appengine/cloudsql, is only for Google App Engine and it doesn't exist on everywhere else.
I'm wondering how can I use it for GAE and standard sql library for other environments in a single library.
PS: I can setup Google App Engine SDK correctly. My question is not relevant to it. I hope my library runs on Google App Engine and standalone environment together. (I already made a code for GAE and a code for other dabatases.) It is Ok that users have to setup some configurations. But I don't want that users have to modify a library source code.
Thanks for any help.
I solved the problem. I used a build constraint to use the proper routine and avoid an error. There is a build constraint for App Engine, appengine.
The App Engine SDK introduces a new build constraint term:
"appengine". Files that specify
// +build appengine will be built by the App Engine SDK and ignored by
the go tool. Conversely, files that specify
// +build !appengine are ignored by the App Engine SDK, while the go
tool will happily build them.
PS:
Anway, I upvoted other answers. Thank you.
Package import is done during compile/link time. And Go doesn't support runtime conditional imports in distinction from Python.
Feature you are looking for is dynamic library loading (like in C/C++ you can load .so/.dll in runtime), but Go currently doesn't support it.
I'm working on a very simple web app, written in Go language.
I have a standalone version and now port it to GAE. It seems like there is very small changes, mainly concerning datastore API (in the standalone version I need just files).
I also need to include appengine packages and use init() instead of main().
Is there any simple way to merge both versions? As there is no preprocessor in Go, it seems like I must write a GAE-compatible API for the standalone version and use this mock module for standalone build and use real API for GAE version. But it sounds like an overkill to me.
Another problem is that GAE might be using older Go version (e.g. now recent Go release uses new template package, but GAE uses older one, and they are incompatible). So, is there any change to handle such differences at build time or on runtime?
Thanks,
Serge
UPD: Now GAE uses the same Go version (r60), as the stable standalone compiler, so the abstraction level is really simple now.
In broad terms, use abstraction. Provide interfaces for persistence, and write two implementations for that, one based on the datastore, and one based on local files. Then, write a separate main/init module for each platform, which instantiates the appropriate persistence interface, and passes it to your main application to use.
My immediate answer would be (if you want to maintain both GAE and non-GAE versions) that you use a reliable VCS which is good at merging (probably git or hg), and maintain separate branches for each version. The GAE API fits in reasonably well with Go, so there shouldn't be too many changes.
As for the issue of different versions, you should probably maintain code in the GAE version and use gofix (which is unfortunately one-way) to make a release-compatible version. The only place where this is likely to cause trouble is if you use the template package, which is in the process of being deprecated; if necessary you could include the new template package in your GAE bundle.
If you end up with GAE code which you don't want to run on Google's servers, you can also look into AppScale.
External database interface - Does Alfresco use point and click integration or is programming required to connect to the DB?
Can we use a 3rd party library like Google's zxing barcode reader to integrate with
Alfresco?
Regards
vish
What do you mean by external database interface? If we're talking about using external databases, then it's just a matter of configuration.
It's generally not a problem to integrate 3rd party libraries. You just have to decide how to do that, e.g. using a custom Java backed web script or a custom action.
No point and click integration. It's build on Java, so you can write a custom Java class. The java class can be run scheduled, via a webscript, via workflow.
Of course, it's open source and fully build on Java, so integrate any 3d party solution into it. But you need to write everything yourself.
already exists a component for Alfresco Share which allow feature #1 with "zero code", in easy and flexible way.
Is available in Alfresco Addons http://addons.alfresco.com/addons/alfresco-metadbconnector-component.
Developed and maintained by VenziaIT (http://venzia.es).
We hope this help to the community.
Greetings!