This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
API vs Toolkit vs FrameWork vs Libarary
Can someone Explain the differences between an API, a Framework and a Library.
Some examples would be helpfull , specially for API.
API (Application Programming Interface) - Allows you to use code in an already functional application in a stand-alone fasion.
Framework - Code that gives you base classes and interfaces for a certain task/application type, usually in the form of a design pattern. (Though not always)
Library - Related code that can be swapped in and out at will to accomplish tasks at a class level
Ref Ryan answer
Related
This question already has an answer here:
Do Karate support .avro file as an input request?
(1 answer)
Closed 1 year ago.
Beyond the interfaces that you offer out of the box, we have some other interfaces which need to be integrated within E2E tests. Those are TCP based protocols.
Is there any chance that you will make karate extendable any time soon so that we can make such calls in actions like statements and not via JS/Java API?
We would need something like
... REST API Test
And send customProtocol message(attr1=1,attr2=2)
Then expect customProtocol message(res=OK)
... GUI Test
Karate is already "extendable" via Java interop. If you use Java interop, you will need one extra line to "import" the API you need. And yes, you will not get the "natural language" look that you seem to be after, but in my honest opinion, all of that is very over rated.
So if the extra line and using an API that looks like Java in a feature file is a deal-breaker for you, you may need to look for some other framework.
Please take a look at this example, where you can get close to a custom DSL using the JS or Java-interop approach: https://twitter.com/getkarate/status/1144458169822806016
I also think that for your TCP based protocol, this answer directly answers your question: https://stackoverflow.com/a/62826394/143475
This question already has an answer here:
Do Karate support .avro file as an input request?
(1 answer)
Closed 1 year ago.
Can Karate Test Framework work with Spring Webflux where return type is Mono<> and Flux<> Objects rather than the json string. Any refernce would be helpful.
Note that typical Karate usage is at the HTTP layer for REST / GraphQL - so it doesn't matter what the underlying technology is at all. So please re-check what your project requirements are.
There are plenty of examples and tutorials for Spring Boot - just do a search.
That said - Karate has very good Java interop and that may be the solution in this case. I don't know of any examples. But please refer to these answers and that should get you started:
https://stackoverflow.com/a/62826394/143475
Karate: Convert string to karate native variable in javascript
This question already has answers here:
What do two colons mean in PHP?
(5 answers)
Closed 9 years ago.
I'm a newbie in programming and now I'm learning yii framework and it's really hard.
What does this declaration mean :
something::something
for instance : CHtml::encode, yii::appname, CHtml::dropDownList, etc...
Yii::app()->request->baseUrl;
CHtml::encode($data->getAttributeLabel
What does it actually means?
And do you guys have a recommendation for learning yii framework other than Larry Ullman's?
I really need a tutorial.
Thanks.
That is the part of language(PHP), also called scope resolution (::). Not only with YII, its common to all PHP framework. Please go with some PHP language manual first, its tutorials. Then only you will be comfortable with any PHP framework like YII.
For an iOS app that will eventually be ported to Android/Winphone, I would love to be able to write some re-usable libraries in c#, but author the iOS UI in traditional Obj-C and reference the library written in c# from Xcode and consume it from Obj-C.
I've found lots of docs that talk about going the other way via bindings (Obj-C -> C#), but not much pertaining to my question. Also, a similar question was asked 4 years ago here, but a lot has changed in the ecosystem, the info seems out of date, and some of the links in the answers now redirect elsewhere:
Is there a way to mix MonoTouch and Objective-C?
So, is this possible? If so how, and what's the best way to achieve it today? (Or alternately, is this a bad idea and should be abandoned?)
No, it is not currently possible to consume a C# library from Objective-C.
Note that it is usually possible to do it the other way with some ingenuity - the only real requirement is that the app must be a Xamarin.iOS app and the entry point the managed Main method. In your Main method you can call into native (C/Objective-C) code and have all your logic there.
My question is very simple, and I want a clear answer with a simple example.
What's the main difference between API, Toolkit, Framework, and Library?
I prefer following:
An API is an abstract description of how to use an application. For example, an API may describe the function syntax (declaration) of a chat server. i.e. login, publish_message, subscribe_messages. And, it describes any protocols to use the application. i.e. must login before sending or recieving messages, or clients are dropped after 2 minutes if not sending or receiving messages.
A library is an implementation of an API, it containes the compiled code that implements the functions and protocols (maintains usage state).
A toolkit is a set of libraries (API) and services grouped together to provide the developer with a wider range of possible solutions. For example, the Globus Toolkit provides services (such as File transfering, Job Subission and Scheduling) that a devleoper can install and start on their servers. They also provide API's to build applications that may use the services deployed in an integrated fashion. For example, the developer may build a program that uses the Job Submission API to communicate with the Job Submission Service.
A Framework is a set of guidelines that prevents inappropriate use or developement. The developer must contruct their applications within the rules and boundaries of the framework. This is done by forcing the developer to extend the current framework to develope new software. by extending the framework, you force adhearence to the framework.
I'm not saying these are completely correct, but its worked ok for me so far!
This has always been my understanding, you will no doubt see differing opinions on the subject:
API (Application Programming Interface) - Allows you to use code in an already functional application in a stand-alone fasion.
Framework - Code that gives you base classes and interfaces for a certain task/application type, usually in the form of a design pattern. (Though not always)
Library - Related code that can be swapped in and out at will to accomplish tasks at a class level
Toolkit - Related code that can be used to accomplish tasks at a component level.
Those terms sometimes are misinterchanged.
Similar posts, read:
What is the major difference between a framework and a toolkit?
Framework vs. Toolkit vs. Library
I prefer to call a library as an alias of module or namespace. Toolkit and A.P.I. is usually a set of libraries for a common task. Altought, A.P.I. is more used for Procedural Programming than Object Oriented Programming.