SAP PowerDesigner Data API - powerdesigner

I am want to create CDM in powerdesigner using import functionality. I have explored the option of importing excel but this requires user to refresh the imported excel in case of any changes.
What I want is to call an API, which will provide json/xml data, from powerdesigner, either desktop or web application, to generate CDM . Is this option available in powerdesigner? if yes, then how can I do it?

There is quite usable Java API which you can use basically to do anything can be done manually in PD. So you can process almost any input/ouput file to create various diagram.

Related

Exporting Content Type Data from Drupal 7 Database

we're in the process of moving a client site from Drupal to Kentico and hoping to speed up some of the content creation by importing data for a custom content type. I don't have development access to the Drupal site to do anything in PHP, I only have a full export of the database that we've restored in our MSSQL environment.
I've been looking through the database and trying to reverse engineer how this info is stored, but it's extremely complicated compared to exports we've used from other CMS platforms. So far from what I can tell, I need to at least use a combination of data from the node table and the field_data_ tables. For example, in Drupal there's a custom content type for award, so I'm looking at the data tables that start with field_data_field_award_, but those look like they need to be further joined to something else since they don't contain the data itself.
Any insight or suggestions are much appreciated.
Using only DB export to do migration can turn out to be unnecessarily complex.
An easy option would be to create REST endpoints in Drupal application to pull content pages as JSON and then consume JSON in kentico to create content.
For example: /api/awards will render all awards pages in Drupal.
For Drupal 8 You can use views REST export to create this endpoint in minutes.
For Drupal 7 https://www.drupal.org/project/views_data_export can be used to export content as JSON

Generate shareable link feature in Django?

I have a Django Rest Framework application that is fed in data from a csv. I then use React to create dashboards and Widgets from that data. I want to be able to generate a link to share a read-only version of any dashboard, much like in Google docs etc. Anyone clicking on that link will be able to see the dashboard with all the charts and analytics etc. The link can be shared much like how you share a Google Forms link. I'm not sure how to go about doing that. Any help / pointers would be appreciated. Thank you!
I think theoretically you need to use a router on your react app (e.g. https://reactrouter.com/ ).
If you're using create-react-app, you can also refer to https://create-react-app.dev/docs/adding-a-router/#:~:text=Create%20React%20App%20doesn't,is%20the%20most%20popular%20one.) .
With this you can directly read parameters on a certain page within your react app, that you can then use to build a concrete call to the backend, to retrieve the necessary data to build your dashboard.
The 'link builder' functionality most likely needs to be implemented on the backend, so you can have the necessary parameters you need to gather the necessary data, maybe by using query strings.
If you want to make it more complex, you would need to implement on the backend a kind of tokenized access, that could store the full call parameters on the backend side, and associate them with a token of some kind, that you could then provide to your clients.
e.g. : http://djangoappxpto.com/link/12345abcd points to a react page component that then executes a fetch to http://djangoappxpto.com/api/getStats/12345abcd which once received by python would internally mean something like http://djangoappxpto.com/api/generateStatsReport/?param1=a&param2=b&param3=w&param4=aa .

Web Apps - How to Dynamically Present Announcements

I am developing a web app that has a page that displays updates and announcements. I am not familiar with how other websites accomplish this. Do people store their announcements/updates in a database and just update their database whenever they have a new announcement?
What are the standard methods that people use to accomplish something like this at scale?
Basically what you want is a backend that runs a websocket port for clients to bind to. So a client would send his request to post an announcement, this could be via the web socket or any other API( REST, SOAP, GraphQL).
The server can then save the announcements in its Database or/and push update to all the clients attached that an announcement was added through the websocket port. Then the client can handle the response from the server according to its logic.
To fetch announcements for clients which were not connected at the time of announcement via websocket, you can just reply with all the announcements made after a client disconnected.
There are a lot of possible solution, all with different degree of difficulty and flexibility:
1. Hardcode everything in your HTML page
It's the easier solution in the short term, but it would become harder and harder as the projects grows. I would not suggest doing this even for smaller projects.
2. Save the list on a committed data source
For example, create a JSON file in your project with the following structure:
[
{
"type": "announcement",
"date": "2020-08-18",
"title": "New announcement!",
"content": "Bla bla bla...",
},
{
"type": "update",
"date": "2020-08-18",
"title": "Version 2.1.0",
"content": "Here is the changelog: ...",
},
]
Then your webapp can load this file and render it accordingly. This approach has some advantages:
You don't need to rewrite all the boilerplate html everytime
The changes on the update page are committed, so they are easier to review or cancel
However, you still need to insert html in your content field and that could be problematic to do by hand everytime (especially if you need to add images, tables or more complex elements). Also, the changes are in the codebase, so they can not be delegated to a not-technical person (such as the marketing manager).
Also, it is not very efficient to load and parse a json file everytime. You can add some caching, but it's still not as performant as a database
3. Save the list manually in the database
This solution is very similar to number (2). It provides some performance improvement, but most of the other disadvantages remains valid.
4. Use a database and implement a GUI for creating/editing/publishing announcements
The ideal solution is to use a database, while also implementing in the backend a restricted area where it is possible to manage the announcements using a WYSIWYG editor.
Advantages:
Maximum flexibility and it does not require writing the HTML by hand everytime
Anyone can write and publish the announcement, it does not have to be a developer
Disadvantages:
You need to develop the whole editing/publishing system
I don't know whats your programming language or technologies you're using. But, I guess you want a realtime updates and announcement. I'm suggesting you to use realtime databases like FCM to handle it:
https://firebase.google.com/docs/cloud-messaging/concept-options?hl=id
In this example, it using NodeJS:
https://thecodebarbarian.com/sending-web-push-notifications-from-node-js.html
It depends upon how you want to handle it.
Some use this technique of storing in a database and updating it.
Another approach is that you can simply use a web crawler to import the announcement/notices if you are taking references from another websites and you won't need to create a database too. But, your website will be little bit slow but will save the memory for database.
The standard method for putting text onto webpages without hardcoding it is using a content management system or CMS. This can be big and complex, or simple and lightweight.
The approach I've seen work best is to use a "headless CMS", which gives non-technical people a UI to enter the content, and an API which allows your application to grab that content (e.g. as JSON), and render it in whichever framework you're using. This works for "Announcements", or other text content like FAQs, terms & conditions etc.
Another approach is to use a "static site generator" which takes text in a specific format and spits it out as HTML. You could use this to build a pipeline to take "announcements" written in markdown and committed to Git, which are converted by the static site generator into an HTML snippet, which you then render using your NodeJS application.
As stated before, a CMS (content management system) is probably the way to go. If you haven't decided on how to build your web app, I would strongly advise you to use a web framework.
If you are in search of a good solution I would recommend Django and Django CMS.
Both are well documented, open-source and can scale as needed.
Django:
https://docs.djangoproject.com/en/3.1/contents/
Django CMS:
http://docs.django-cms.org/en/latest/

How to build sets of entity records using Breeze and local storage

I'm trying to create an off-line data collection app, using AngularJS.
I think, adding Breeze.js should help with saving and querying data to and from the browser local storage:
1) present the user with angular data entry form
2) when the "save" button is clicked - create a new Breeze entity and store it locally
3) the next time this form is used - create a second entity, and add/save it as a part of the same collection
I was wandering if anyone have tried to do something similar and could give me some pointers of how this is done.
I think it's viable and these links should help you to get started:
http://www.breezejs.com/documentation/querying-locally
You also might want to check this Angular sample aswell:
http://www.breezejs.com/samples/todo-angular
One caveat you have to have in mind is that Breeze will need to load the model's metadata from somewhere. Typically you hit a Web API asynchronously and get the metadata from there. However, on your particular scenario you should give a look at trying to load your metadata from a script file. Here's an how-to and discussion about it:
http://www.breezejs.com/documentation/load-metadata-script

Wordpress blog : Import content

I am running a website using PHP/MySQL. Now I want to allow Blogs using wordpress in my website so I can use Google Adsense along with blog content. I have installed Wordpress on my site, using tools provided by host service provider.
Now is there anyway I can import selective-content from MySQL database to these wordpress blogs? If so, how?
Thanks.
Short answer: maybe.
It all depends on how the content in your existing MySQL database was structured. If the old content was created by a content management system, see if it has a built-in exporter. WordPress has plug-ins that can import from a variety of commonly-used CMS platforms already. Check to see if yours is supported.
Unfortunately, if your content was just kind of "there" in the database without a CMS or any kind of standard (non-custom) structure, then this won't really work. My recommendation would be to use phpMyAdmin to export your content, then use a text editor to cut out the portions you want to keep and manually create new blog posts within WordPress. This process will be very time consuming but can be optimized if you want to build a custom importer.
Yes you can import/export your contents from/to other site respectively using following ways
Using Plugins like duplicator etc
Using the existing WordPress tools availabe in the Dashboard/Admin section like Import & Export
There may be other different methods also available on the internet.

Resources